Skip to content

Instantly share code, notes, and snippets.

View rossnelson's full-sized avatar
💀

Ross Nelson rossnelson

💀
View GitHub Profile
# Probably excessive, but it makes these instructions simpler
sudo -i
# Add postgresql repo and update apt listing
echo "deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
# For some reason this is necessary with PostgreSQL on Ubuntu 12.04
update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz
@rossnelson
rossnelson / facebook.php
Last active August 29, 2015 14:10 — forked from jonathantneal/facebook.php
Social Media Access
<?php
/* Getting a JSON Facebook Feed
==========================================================================
1. Sign in as a developer at https://developers.facebook.com/
2. Click "Create New App" at https://developers.facebook.com/apps
3. Under Apps Settings, find the App ID and App Secret
@rossnelson
rossnelson / 0_reuse_code.js
Created July 2, 2014 15:44
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
@rossnelson
rossnelson / postgres-queries.rst
Created April 28, 2012 18:04 — forked from madelfio/postgres-queries.rst
Useful Postgres Admin Queries

Useful Postgres Admin Queries

  • pg_stat_activity (currently executing queries):

    select * from pg_stat_activity where current_query not like '<%';
    
  • pg_user (all database users):

    select * from pg_user;
    
@rossnelson
rossnelson / Rails 3 Environment
Last active September 29, 2015 08:48 — forked from laserlemon/Rails 3 Environment
Snow Leopard, Homebrew, Git, RVM, Ruby, Passenger, Apache, MySQL and ImageMagick
# 2012-01-07
#
# Mac OS X 10.6.8
# Homebrew 0.7
# Xcode 3.2.4
# Git 1.7.3.1
# RVM 1.0.12
# Ruby 1.9.2, 1.8.7
# Rails 3.0.0
# Passenger 3.0.0.pre4