Posts from 2011-03

Homebrew instead of MacPorts

I chose it because it seems to be more actively developed.

As explained on https://github.com/mxcl/homebrew/wiki/installation I installed Homebrew like this:

/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

I had XCode already installed, but If you don't, you have to install it before following the next steps (in order to have...

Read on

Install a Git Plugin for VIM: git-vim

To install git-vim run:

cd ~/Downloads
git clone https://github.com/myw/git-vim.git
cd git-vim
# by default, the Makefile is set up for Mac OS. If you use a different OS change it using:
cat Makefile | sed "s|#INSTALL=install|INSTALL=install|g" | grep -v ginstall > Makefile
# then install the plugin:
make install

This will copy the following files to...

Read on

Set up Vim for Python

resources

...

Read on

Install Cacti

Basic Installation

In this installation documentation I assume you already have apache2 as well as php5 installed.

First create an apache2 configuration file for cacti with vi /etc/apache2/sites-available/cacti and enter the setup similar to this:

NameVirtualHost *

<VirtualHost *>
    ServerAdmin admin@example.com
    ServerName...

Read on

Set up sending emails on a local system by Transfering it to a SMTP-Relay-Server (Smarthost)

SMTP-Relay-Server = Mail-Relay-Server = Smarthost

ssmtp

A slim smtp forwarding tool can be installed via the package ssmtp (it provides /usr/sbin/sendmail):

# apt-get install ssmtp

The configuration file /etc/ssmtp/ssmtp.conf:

# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster

# The place where the mail...

Read on

Solve jittery Magic Mouse (MBP early 2011, WiFi interference)

I experienced a problem with my Apple Magic Mouse when I wanted to use it with my new MacBook Pro (early 2011, Core i5): The movements became "blurry", jittery. I have an external display connected via Mini Displayport but this does not seem to affect the problem. But when I...

Read on

Set the hostname on an Apple Computer with Mac OS X 10.6

The hostname can be changed with scutil on Mac OS X. scutil provides a command line interface to the “dynamic store” data maintained by configd. [from the scutil manual].

To set a new hostname run:

sudo scutil --set HostName newhostname[.domain]
...

Read on

Create Your Own 64 bit Linux Distribution - using Cross Linux From Scratch

http://cross-lfs.org/view/svn/x86_64-64/introduction/how.html

...

Read on

MS-DOS Startup Disk on USB Stick

This worked great: http://files.extremeoverclocking.com/file.php?f=197 (SP27608.exe and win98boot.zip)

With the thus created USB startup MS DOS stick, I was able to flash the bios on an older netbook (no optical device / no Floppy obviously).

...

Read on

Backup Google Contacts

Possible Choices

...

Read on

Keyboard Commands for the IceWM Window Manager

See Keyboard Commands in the IceWM manual.

...

Read on

Install git on Scientific Linux SL 5.4

If you want to install the latest version of git (from source), run:

yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel
cd /usr/local/src
wget http://git-core.googlecode.com/files/git-1.7.9.2.tar.gz
tar xzvf git-1.7.9.2.tar.gz
cd git-1.7.9.2
make prefix=/usr/local all
make prefix=/usr/local install

resources

...

Read on

Make Piwik Detect the Header X-Forwarded-For or X-Real-IP (that for example nginx can set as reverse proxy for your site)

If you run a Piwik installation behind an nginx reverse proxy, you have to change a bit of your configuration because the remote IP has changed to that of the nginx reverse proxy.

For example if your nginx reverse proxy configurations includes:

proxy_set_header HOST $host;
proxy_set_header...

Read on

Database abstraction with Python: SQLAlchemy

The SQLAlchemy SQL Toolkit and Object Relational Mapper is a comprehensive set of tools for working with databases and Python. It has several distinct areas of functionality which can be used individually or combined together. Its major API components, all public-facing, are illustrated below:

+-----------------------------------------------------------+
|    ...

Read on

PostgreSQL

http://www.postgresql.org/
documentation with user comments: http://www.postgresql.org/docs/8.4/interactive/index.html

install on Ubuntu

http://wiki.ubuntuusers.de/PostgreSQL (German)
https://help.ubuntu.com/community/PostgreSQL

sudo apt-get install postgresql

pgAdmin III is a handy GUI for PostgreSQL, it is essential to beginners. To install it, type at the command line:

sudo apt-get install pgadmin3

Setup: Now you have to set the password for the...

Read on

SQLite

http://www.sqlite.org/

Important Notes

Omitted SQL Language Features
http://www.sqlite.org/omitted.html

SQLite Keywords
http://www.sqlite.org/lang_keywords.html
you cannot choose table names from the keywords list!!!

enforce foreign keys
SQLite Foreign Key Trigger Generator: http://www.rcs-comp.com/site/index.php/view/Utilities-SQLite_foreign_key_trigger_generator
http://glossar.hs-augsburg.de/SQLite_Foreign_Keys_erzwingen
http://sqlzoo.net/howto/source/u.cgi/tip241028/sqlite

Jump Start

SQLite with Python

http://docs.python.org/library/sqlite3.html
http://www.wdvl.com/Authoring/python/SQLite/Watts07162009.html

Admin tools / GUIs

SQLiteStudio

http://sqlitestudio.one.pl/

Open Source, cross platform!

SQLite Database Browser

http://sqlitebrowser.sourceforge.net/

sudo apt-get install sqlitebrowser

Sqliteman

http://sqliteman.com/

sudo...

Read on