Ever wonder how Standard Normal and Student-t Distribution z-tables are generated?

I have created a program on github to answer this question with examples and code samples: https://github.com/jlinoff/ztables. It shows how to generate z-tables for Standard Normal Distributions and Student-t Distributions. It also shows how to generate the z-values for specific probabilities from those distributions without using any special libraries.

The program has been tested using Python 2.7.10 and 3.5.

Simple python web server to demonstrate GET/POST handling and support for embedded Python- round 2

I created a simple python based web server to demonstrate how to use SimpleHTTPServer.SimpleHTTPRequestHandler for handling GET/POST requests. It also demonstrates how to build a system that supports embedded python, templates, create custom URLs, execute local scripts and a number of other things.

It is a single script that acts like a web server, a web server gateway interface and server code so the solution is completely self contained.
Continue reading Simple python web server to demonstrate GET/POST handling and support for embedded Python- round 2

Bash script to install python locally without root permissions

This bash script downloads, builds and installs a particular version of python in the location of your choice without requiring root permissions. It also creates a virtual environment that you can activate to use it. It is licensed under the terms of MIT open source license.

This script is also available on github: https://github.com/jlinoff/pybld.git

Continue reading Bash script to install python locally without root permissions

Bash function that accepts white space arguments

This example shows how to create a bash function that will accept white space arguments. This doesn’t come up often but when it does I have to re-discover how to do it. This little reminder will make that rediscovery process unnecessary.
Continue reading Bash function that accepts white space arguments

Bash script to install gcc 4.8.4 and boost 1.57 on CentOS and Mac OS X

The bld.sh script provided installs gcc 4.8.4 and boost 1.57.0 on CentOS and Mac OS X for testing. It is another entry in my continuing series of releases for different versions of g++. Hopefully this will make it easier for folks that want to experiment with this version of the GNU C++ compiler to use C++-11 constructs.

This script is also available on github: https://github.com/jlinoff/gcc-4.8.4-boost-1.57.

Continue reading Bash script to install gcc 4.8.4 and boost 1.57 on CentOS and Mac OS X

Simple python web server to demonstrate GET/POST handling

This blog describes a simple open source (MIT licensed) web server that demonstrates how browser/server interactions work for GET and POST requests using the python BaseHTTPServer package. It was updated to version 1.2 on 20-May-2015. This software is licensed under the term of the MIT license. Feel free to use it however you wish.

Use it as a starting point to understand the package when creating your own custom web server for handling specific types of requests but recognize that it is not suitable for a production environment. To use it in such an environment you would, at the very least, want to add improve the error handling and add threading support. You would probably also want to add SSL/TLS support.
Continue reading Simple python web server to demonstrate GET/POST handling

p4-whodunit.py – a python script to display who changed each line of code in a perforce depot file

This script (p4-whodunit.py) will analyze a perforce depot file to determine and report who changed each line of code. It is useful for tracking down recent changes that might have caused a problem. It is covered by the MIT license. You can download it here.
Continue reading p4-whodunit.py – a python script to display who changed each line of code in a perforce depot file

Javascript example that shows how to use the forge package to encrypt/decrypt objects

This example shows how to use the forge package to encrypt and decrypt objects. It also shows how to define a number of useful prototypes and other utility functions.
Continue reading Javascript example that shows how to use the forge package to encrypt/decrypt objects

Bash script to install gcc-4.9.2 with boost 1.57 on CentOS 5.x, CentOS 6.x and Mac OS X

This week I created a script to install the gcc-4.9.3 compiler and linker with boost 1.5.7. A very simple Makefile is also available. Both files are based on scripts I have created for earlier versions of the compiler. This version also includes tcmalloc for linux platforms.
Continue reading Bash script to install gcc-4.9.2 with boost 1.57 on CentOS 5.x, CentOS 6.x and Mac OS X

Bash script to fix the shellshock vulnerability on Mac OS X 10.9.5 (CVE-2014-6271)

This script will build and install a new version of bash and sh from source that will fix the bash shellshock vulnerability on Max OS X 10.9.5 until the official patch is released from Apple. It requires the XCode command line tools. If you do not have the XCode command line tools installed, I have made pre-built versions of bash and sh available for download.
Continue reading Bash script to fix the shellshock vulnerability on Mac OS X 10.9.5 (CVE-2014-6271)

Bash files to install gcc-4.8.3 and gcc-4.9.1 with boost 1.56 on CentOS 5.x, CentOS 6.x and Mac OS X

This week I created scripts to install gcc-4.8.3 and gcc-4.9.1 with boost 1.56. Here is the simple Makefile.
Continue reading Bash files to install gcc-4.8.3 and gcc-4.9.1 with boost 1.56 on CentOS 5.x, CentOS 6.x and Mac OS X

Bash script to build and install valgrind 3.9.0 with memory limits of 128GB, 256GB and 512GB on linux-x86_64

Valgrind must have fixed memory limits so that it can accurately track the memory allocations of the program under test. On 64 bit architectures it is limited to 64GB. This script will download, modify and build valgrind for larger memory configurations.
Continue reading Bash script to build and install valgrind 3.9.0 with memory limits of 128GB, 256GB and 512GB on linux-x86_64

Bash script to install gcc 4.9.1 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X 10.9

The bld.sh script provided installs gcc 4.9.1 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X for testing. It is another entry in my continuing series of releases for different versions of g++. Hopefully this will make it easier for folks that want to experiment with this version of the GNU C++ compiler.

This script is also available on github: https://github.com/jlinoff/gcc-4.9.1-boost-1.55.

Continue reading Bash script to install gcc 4.9.1 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X 10.9

lock_files.py – a python command line tool to encrypt or decrypt files using AES encryption and a common password

lock_files.py is a python command line tool to encrypt or decrypt files using AES encryption and a common password. You can use it lock files before they are uploaded to storage services like DropBox or Google Drive.

It is available from github: https://github.com/jlinoff/lock_files. You will find a more complete description of the tool including the command line options there.

Phonegap barcode scanner app using ionic and angularjs

I created a full implementation of a phonegap barcode scanner app using the ionic and angularjs frameworks for the platforms supported by com.phonegap.plugins.barcodescanner. The platforms supported are Android, iOS and Windows Mobile. It is available from github: https://github.com/jlinoff/PgBarcodeScanner.git.
Continue reading Phonegap barcode scanner app using ionic and angularjs

Bash script to install gcc 4.8.3 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X 10.9

The bld.sh script provided installs gcc 4.8.3 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X for testing. It is another entry in my continuing series of releases for different versions of g++. Hopefully this will make it easier for folks that want to experiment with this version of the GNU C++ compiler.

This script is also available on github: https://github.com/jlinoff/gcc-4.8.3-boost-1.55.

Continue reading Bash script to install gcc 4.8.3 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X 10.9

Automatically install a webserver based on django, nginx and gunicorn on a CentOS 6.5 VPS

This blog presents a bash script that I created to automate the installation of a webserver based on django, nginx and gunicorn on a CentOS 6.5 VPS. The installation installs and configures the necessary system packages, and it installs a number of javascript tools like jquery, jquery-ui, datatables, flot, fancytree and others.
Continue reading Automatically install a webserver based on django, nginx and gunicorn on a CentOS 6.5 VPS

Simple algorithm to insert commas (commaize) in 9 languages


This project contains nine different language implementations of a simple algorithm named “commaize” that inserts commas into a number. The languages are: bash, c++, java, javascript, perl, php, python, ruby and tcl. My hope is that it will be a useful reference.
Continue reading Simple algorithm to insert commas (commaize) in 9 languages