Reliable file updates in Python

, Categories: Python / Tech .

Machines can fail, so it’s important to make sure your files are saved. This article has some great ways of doing reliable file updates with python. Great stuff.

Read more →

Redirect stdout to log from a bash script

, Categories: Linux/Unix / Tech .

My colleague Day Barr found this very useful Stack Overflow article. It shows how to redirect stdout to a log file from with a bash script. This is very useful if you’re debugging an existing bash script and don’t want to add a redirect to every line in it.

Read more →

Replace last occurrence of a character in vim

, Categories: Vim / Tech .

This stackoverflow post has a cool way to remove the last occurrence of a character in vim : :%s/.*\zs,/|/ This replaces the last occurrence of a comma with a pipe. Other examples can be found on the vim wikia.

Read more →

Useful Linux commands

, Categories: Linux/Unix / Tech .

Thus is just a list of useful Linux commands. Putting them here means I can always find them. See the info of an uninstalled rpm : `rpm -qip --provides an.rpm` Check Linux is 64 bit: `egrep -c ' lm ' /proc/cpuinfo` Bigger than zero means 64 bit. Lm stands for Long Mode. Check that a package is installed in Ubuntu : `dpkg --get-selections | grep python`

Read more →

MySQL 5.6 GTID settings

, Categories: MySQL / Tech .

The following settings are the minimum required if you want to use Global Transaction IDs with MySQL 5.6 : log-bin=bin-log log-slave-updates enforce-gtid-consistency binlog-format=ROW datadir = /var/lib/mysql port = 3306 server-id = 1 gtid_mode = ON report-host =

Read more →
Previous page Next page