Skip to content

Instantly share code, notes, and snippets.


Andreas Brekken abrkn

View GitHub Profile
hedgehog / gist:386057
Created May 1, 2010
EC2 AMI with chef-server installed
View gist:386057
# From list post by John Merrells <>
# Modified by Mike Bailey <>
echo "-----" >> $logfile
# New sources.list
cat > /etc/apt/sources.list << EOF
matthewmccullough / git-deletealltags.bsh
Created Apr 1, 2011
Script to delete all tags both locally and remotely
View git-deletealltags.bsh
for t in `git tag`
git push origin :$t
git tag -d $t
tvandervossen / gist:1231476
Created Sep 21, 2011
Mobile Safari viewport sizes on iOS 4.3 and 5
View gist:1231476
1024 × 690 In landscape on iOS 4.3
1024 × 672 In landscape on iOS 5
768 × 946 In portrait on iOS 4.3
768 × 928 In portrait on iOS 5
1024 × 660 Always showing bookmarks bar in landscape on iOS 4.3
1024 × 644 Always showing bookmarks bar in landscape on iOS 5
768 × 916 Always showing bookmarks bar in portrait on iOS 4.3
hileon / gist:1311735
Created Oct 25, 2011 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:1311735

Sublime Text 2 – Useful Shortcuts (Windows)


Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file


bradland /
Last active Nov 18, 2020
SSH known_hosts tools
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H >> /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -F
paulirish / rAF.js
Last active Jun 23, 2021
requestAnimationFrame polyfill
View rAF.js
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
rn0 / README.markdown
Created Feb 20, 2012 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things
View README.markdown

This is an extension to Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
    # source can be a function
    source: (typeahead, query) ->
      # this function receives the typeahead object and the query string
simenbrekken / uploader.js
Created May 2, 2012
Fetch, resize via ImageMagick and store image on Amazon S3 with node.js
View uploader.js
var spawn = require('child_process').spawn,
aws2js = require('aws2js'),
http = require('http'),
urlutil = require('url')
mime = require('mime'),
Buffers = require('buffers');
var settings = {
s3: {
key: 'key',
Goles / CountryCodes.json
Created Jul 29, 2012
Country and Dial or Phone codes in JSON format
View CountryCodes.json
[{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375","
chen206 / gist:4030441
Created Nov 7, 2012
Install Postgresql 9.2 on Ubuntu 12.04
View gist:4030441
# Install Postgres 9.2 on a clean Ubuntu 12.04
LC_ALL issue
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file.