Brad Lucas

Programming, Clojure and other interests

Bash With An Empty Environment

July 22, 2017

When writing bash scripts that look for environment variables it is a good idea to check that these environment variables exist at the top of the script. For this you do things like the following.

if [[ -z $LOG ]]; then
  echo "Missing LOG environment variable"
fi

Now once you've created your environment variable how can you test your script for the case where the environment variable doesn't exist? For this you can open another bash shell with no environment variables. An empty environment if you will. To do this try the following.

$ env -i bash --norc --noprofile

Continue reading →

Mac Cleaner

July 21, 2017

Ran out of space on the MacBook and found this free Mac cleaner application that worked well.

AppCleaner from FreeMacSoft

Works well.


Continue reading →

Python 3

July 20, 2017

Installing

On a Mac here is an easy method to get Python 3 installed.

$ brew install python3

After this step you'll have your original Python 2.7 version as python and your new Python 3 version as python3.

Virtual Environments


Continue reading →

Ethereum Wallet To Local Geth Instance

July 19, 2017

The following are some notes on getting an Ethereum Wallet running on OSX to talk to an previously running geth instance.

If you start your experimenting with Ethereum on a Mac you'll most likely begin by downloading the Ethereum Wallet. This application will install geth locally and automatically start an instance of it and know how to communicate with it automatically. In addition there is a menu option to switch between running geth against the public chain as well as the –testnet chain.

At some point if you are developing an application or more of a command-line person you'll start running geth manually from the command line to keep your chain up to date or to rebuild it. At this point you may want to know how to start the Ethereum wallet to connect with an existing geth session rather than complain when you start the wallet and it notices a previous geth instance and then refuses to start.

Here are the details for OSX. The idea is similar for other operating systems. In short you want to pass the geth.ipc filename and location to the Wallet so it can communicate with the existing geth session.


Continue reading →

Ethereum Installing Geth On Centos

July 18, 2017

The notes over on Ethereum.org when talking about installing geth on a Linux box give instructions using apt-get. Here I have a Centos box and needed an alternative method.

If found that building from source worked just fine using the following steps.

Building

$  sudo yum install golang
$  sudo yum install gmp-devel
$  git clone https://github.com/ethereum/go-ethereum
$  cd go-ethereum/
$  make geth
$  ls -al  build/bin/geth

Continue reading →