Brain Goo

Carpe Crap ‘em

Brain Goo header image 4

Entries Tagged as 'How Tos'

HOWTO Redirect Linux Console Without Reboot

October 3rd, 2011 · No Comments

You can re-apply your /etc/inittab file in real-time without rebooting your machine. This allows you to do a lot of neat things, such as redirect your system console to the serial port without a reboot. Edit your /etc/inittab file and add this line: S0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt102 Execute the following command: telinit q && [...]

[Read more →]

Tags: How Tos · linux

HOW TO detect STDIN with Python

July 25th, 2011 · No Comments

In Python, as with most languages, STDIN is treated like a file. You can read from it any time, but knowing what kind of file it is lets us know if someone passed us something via STDIN or if we are going to prompt them for it. import os, sys if os.isatty(file.fileno(sys.stdin)):     print “Reading list [...]

[Read more →]

Tags: How Tos · Programming · python

HowTo Use an HTTP Proxy With Git

April 29th, 2011 · No Comments

git should use the environment variable $http_proxy so set that and you should be ok. If you don’t want to use the environment, set it statically like this: $ git config –global http.proxy http://proxy.example.com:8080 $ git config –get http.proxy http://proxy.example.com:8080

[Read more →]

Tags: git · How Tos · Programming