Skip to content

Instantly share code, notes, and snippets.

@miebach
miebach / initserver.sh
Created April 8, 2012 22:39
ubuntu 10.04 first steps for a new rackspace instance
locale-gen en_US.UTF-8
locale-gen de_DE.UTF-8
/usr/sbin/update-locale LANG=en_US.UTF-8
dpkg-reconfigure tzdata
# (select timezone)
sudo aptitude update
sudo aptitude safe-upgrade
@miebach
miebach / install_riak.sh
Created April 8, 2012 22:41 — forked from lanius/install_riak.sh
Install riak 1.1.2 and R14B03 on a minimal Ubuntu 10.04 LTS server
# Install riak-0.14.2rc8 to Ubuntu 10.04 LTS 32 bit
# make sure you have a compatible build system and the ncurses and openssl
# development libraries installed, also git and curl:
sudo aptitude install build-essential libncurses5-dev openssl libssl-dev git-core curl -y
# download, build and install Erlang:
ERLANG=/opt/erlang
@miebach
miebach / openerp-server-kill.sh
Created April 12, 2012 16:24
Kill openerp 6.1 server by pid
#!/bin/sh
kill -9 `ps au|grep 6.1|grep -v "grep"| awk '{print $2}'`
@miebach
miebach / 10.04.sh
Created April 18, 2012 22:26
some basic steps on a new minimal ubuntu system
locale-gen en_US.UTF-8
locale-gen de_DE.UTF-8
/usr/sbin/update-locale LANG=en_US.UTF-8
dpkg-reconfigure tzdata
aptitude update
aptitude safe-upgrade
@miebach
miebach / run_debugger.sh
Created May 3, 2012 20:16
python debugging from the commandline
python -m dbg codefile.py
@miebach
miebach / gist:2605935
Created May 5, 2012 22:16
Install Eric 4 IDE on windows server 2008 (32 bit)

Eric can be installed on windows from source or from binaries.

It is not necessary to install SIP seperateley, if you choose to install from the binaries. The instructions that mention SIP as a seperate install step, are referring to a source install.

How to Install Eric 4 on windows

(from binaries)

  1. Check your python install
@miebach
miebach / tabbed_vector
Created May 13, 2012 18:24
Aligns a list with spaces.
def tabbed_vector(v,tabs,DELIM=", ",LEFT="(",RIGHT="),"):
"""
Adjusts left or right with spaces and inserts commas.
>>> tabbed_vector([1,2],[2,2])
'(1 , 2 ),'
>>> tabbed_vector([1,2],[4,4])
'(1 , 2 ),'
>>> tabbed_vector([1,2],[4,-4])
@miebach
miebach / freeport.py
Created May 18, 2012 16:50
Experimental python script to kill processes on unix-like systems.
#!/usr/bin/python -W ignore::DeprecationWarning
import sys
import os
"""
Experimental python script to kill processes on unix-like systems.
https://gist.github.com/2726360
Looks for all established connections on a given port and kills their processes.
@miebach
miebach / Install nodejs as service
Created May 31, 2012 16:04
Install nodejs as a service on windows
1) Download nssm from http://nssm.cc/download/?page=download and extract nssm.exe, for example to %windir%\system32\
2) Install your service:
nssm.exe install my-node-service c:\programs\nodejes\node.exe c:\my\server.js
3) Start it using net start:
net start my-node-service
@miebach
miebach / _git.cmd
Created June 28, 2012 16:20
Start a git bash shell in the local directory
@echo off
cd /d %~dp0
call c:\bip\git\git-bash.bat