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

Installing jshint and rhino for command line javascript analysis

I recently had to install jshint and rhino. It was a bit of a challenge because they needed ant and npm (node package manager). This blog describes what I did and provides a bash shell script that you can use.
Continue reading Installing jshint and rhino for command line javascript analysis

Make X11 programs work in an ssh sudo session

Have you ever needed to run an X11 based program like emacs or firefox in a sudo session and received one of the following errors?

This blog describes how to fix the problem.
Continue reading Make X11 programs work in an ssh sudo session

Bash script to install gcc 4.7.0 and boost 1.49

I recently wanted to build gcc 4.7.0 on CentOS 5.5 to get access to more C++11 features so I put together this script to do all of the work. It is released in text mode so that you can cut-n-paste it from the web page. The shell version is also available: http://projects.joelinoff.com/gcc-4.7.0/bld.sh if you want to download it directly using a tool like wget.

The full installation of gcc-4.7.0 and boost-1.49 requires about 4GB of disk space. After the build is complete you can delete the archives, bld and src directory trees to reclaim about 3.4GB of disk space.
Continue reading Bash script to install gcc 4.7.0 and boost 1.49

How to fix stale NFS mounts on linux without rebooting

I have often noticed that some folks reboot systems to fix stale NFS mount problems which can be disruptive.

Fortunately, that often isn’t necessary. All you have to do is restart nfs and autofs services. However that sometimes fails because user processes have files open on the stale partition or users are cd’ed to the stale partition.

Both conditions are easy to fix. The steps to fix stale mounts by addressing the previously described conditions are described below.
Continue reading How to fix stale NFS mounts on linux without rebooting

Added a table that presents the same commands in bash and tcsh

I put together a table that presents the same commands in bash and tcsh because I sometimes have to switch between shells and needed a handy reference. It was built up over time by as I came across tidbits that I wanted to remember.

In some cases there are different ways of doing the same thing so I simply chose my preferred approach (such as [[]] expressions rather than [] in the if statements).

I hope that you find it useful.

Bash script to download, build and install gcc 4.6.2 and boost 1.48

I recently had to build gcc 4.6.2 on CentOS 5.5 and found it to be quite painful so I put together this script to do all of the work: http://projects.joelinoff.com/gcc-4.6.2/bld.sh.txt. I am releasing it in text mode so that you can cut-n-paste it from the web page.

The shell version is also available: http://projects.joelinoff.com/gcc-4.6.2/bld.sh if you want to download it directly using something like wget.
Continue reading Bash script to download, build and install gcc 4.6.2 and boost 1.48