Skip to content

Instantly share code, notes, and snippets.

View andymadge's full-sized avatar

Andy Madge andymadge

View GitHub Profile
@trey
trey / django_2012.md
Last active January 27, 2016 22:13
How to start a Django project in 2012

This is a little out of date. Be sure to check the Heroku docs for the latest and greatest.


How to start a Django project in 2012

(and deploy to Heroku)

First, warm up your system.

@trey
trey / jquery_templates.md
Created May 18, 2012 03:05
jQuery Templates

jQuery Templates (most likely out of date)

Create a Template (most basic way):

<script id="book-template" type="text/x-jquery-tmpl">
    <li>${name} (${year})</li>
</script>
@trey
trey / happy_git_on_osx.md
Last active October 9, 2025 17:52
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "[email protected]"

@trey
trey / virtual_hosts_osx.md
Last active October 5, 2015 00:18
The Absolute Least You Need to Do to Use Virtual Hosts on OS X

The Absolute Least You Need to Do to Use Virtual Hosts on OS X

Just stop. You should be using Vagrant and/or Grunt.

Browse previous versions of this gist to see the previous workflow (which doesn't seem to work in Yosemite).

@ollyg
ollyg / logstash.conf
Created June 20, 2012 13:29
logstash config and filter to fully parse a syslog message (PRI, timestamp, host)
filter {
# strip the syslog PRI part and create facility and severity fields.
# the original syslog message is saved in field %{syslog_raw_message}.
# the extracted PRI is available in the %{syslog_pri} field.
#
# You get %{syslog_facility_code} and %{syslog_severity_code} fields.
# You also get %{syslog_facility} and %{syslog_severity} fields if the
# use_labels option is set True (the default) on syslog_pri filter.
grok {
type => "syslog-relay"
@dansimau
dansimau / README.md
Created July 13, 2012 10:39
Enable git-style colour output in regular diff on Mac OS X

Enable git-style colour output in regular diff

Mac OS X

  1. Install colordiff using Homebrew:

     brew install colordiff
    
  2. Add function to your ~/.bash_profile:

@cilquirm
cilquirm / Join a Sharing Session.scpt
Created August 2, 2012 21:19
a simple applescript for quicksilver to join a sharing session
using terms from application "Quicksilver"
on process text joinCode
tell application "join.me" to activate
tell application "System Events"
tell process "join.me"
set visible to true
keystroke joinCode
click button 7 of window 1
end tell
end tell
@bbrewer97202
bbrewer97202 / heroku-htaccess.md
Created August 10, 2012 18:20
Simple htaccess authentication on Heroku with cedar/php

Create an .htaccess file in the webroot:

AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user

Create a .htpasswd file:

htpasswd -c /app/www/.htpasswd [username]

@sachin-handiekar
sachin-handiekar / gist:3317727
Created August 10, 2012 20:48
UK Access Point Name (APN) Settings for Mobile Broadband - UK
Note : Dial - *99#
Vodafone
Vodafone has several possible options for Pay As You Go SIM cards. Try each one in turn until the connection works. All use the same username and password.
APN (contract): internet
APN (PAYG): pp.internet
APN (PAYG): ppbundle.internet
APN (PAYG): smart
APN (PAYG): pp.vodafone.co.uk
@omz
omz / dropboxlogin.py
Created November 7, 2012 21:16
dropboxlogin
# YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW!
# Go to dropbox.com/developers/apps to create an app.
app_key = 'YOUR_APP_KEY'
app_secret = 'YOUR_APP_SECRET'
# access_type can be 'app_folder' or 'dropbox', depending on
# how you registered your app.
access_type = 'app_folder'