Skip to content

Instantly share code, notes, and snippets.

Steps:
Set up EBS
21Created 1 TB EBS
Created 64 Bit Amazon Linux AMI 2012.09 M1 Medium 3.7 gb ram, 2 ECUs
Connect to ec2 instance via ssh
chmod 400 IFS-KeyPair.pem
ssh -v -i IFS-KeyPair.pem [email protected]
Note: Do not replace ec2-user with your user id. This is a AWS Amazon AMI requirement.
@behboud
behboud / map.geojson
Created August 27, 2013 10:14
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@behboud
behboud / VIM stuff
Created October 2, 2013 12:08
substitute vim words
:nnoremap <Leader>s :%s/\<<C-r><C-w>\>//g<Left><Left>
@behboud
behboud / new_gist_file
Created October 23, 2013 14:38
change data dir postgresql
Copy the datadir while retaining permissions - use cp -aRv.
Then (easiest, as it avoids the need to modify initscripts) just move the old datadir aside and symlink the old path to the new location.
Beispiele
Im folgenden Beispiel wird eine Verknüpfung ("Verknüpfung_mit_Tagesplaner") im Homeverzeichnis des Benutzers Benutzer zu einer Datei mit dem Namen "haupt.doc" auf dem Desktop erstellt:
ln -s /home/Benutzer/Dokumente/Tagesplaner/Aufgaben/haupt.doc /home/Benutzer/Arbeitsfläche/Verknüpfung_mit_Tagesplaner
@behboud
behboud / new_gist_file
Created October 25, 2013 08:26
install local postgis
sudo apt-get install postgresql-9.3 postgresql-contrib-9.3 postgresql-server-dev-9.3 postgresql-9.3-postgis-2.1
sudo -H -u postgres /usr/lib/postgresql/9.3/bin/pg_upgrade \
-b /usr/lib/postgresql/9.1/bin \
-B /usr/lib/postgresql/9.3/bin \
-d /var/lib/postgresql/9.1/main \
-D /var/lib/postgresql/9.3/main \
-o ' -c config_file=/etc/postgresql/9.1/main/postgresql.conf' \
-O ' -c config_file=/etc/postgresql/9.3/main/postgresql.conf'
@behboud
behboud / new_gist_file
Created November 3, 2013 21:22
mac postgresql
initdb /usr/local/var/postgres -E utf8 # create a database cluster
postgres -D /usr/local/var/postgres # serve that database
PGDATA=/usr/local/var/postgres postgres # …alternatively
postgres -D /usr/local/var/postgres
postgres -D /usr/local/var/postgres
or
pg_ctl -D /usr/local/var/postgres -l logfile start
To have launchd start postgresql at login:
###################################
## CartoDB 2.0 Install [Working] ##
## Tested on Ubuntu 12.04 ##
###################################
# Change password
passwd
adduser [username]
adduser [username] sudo
@behboud
behboud / Ubuntu 12.md
Created November 10, 2013 12:51 — forked from arjendk/cartodb-install-ubuntu-1204.md
CartoDB stuff
@behboud
behboud / cntlm
Created November 21, 2013 14:20
find in files
Update your user, domain, and proxy information in cntlm.ini, then test your proxy with this command (run in your Cntlm installation folder):
sudo cntlm -c /etc/cntlm.conf -I -M http://www.google.de
It will ask for your password, and hopefully print your required authentication information, which must be saved in your cntlm.ini
Sample cntlm.conf:
Username user
Domain domain
@behboud
behboud / 0_reuse_code.js
Created June 18, 2014 11:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console