Skip to content

Instantly share code, notes, and snippets.

View gregorynicholas's full-sized avatar
💀
alter.

gregory nicholas gregorynicholas

💀
alter.
View GitHub Profile
@paulirish
paulirish / gist:373253
Created April 21, 2010 00:08
jquery invert
// jquery invert plugin
// by paul irish
// some (bad) code from this css color inverter
// http://plugins.jquery.com/project/invert-color
// some better code via Opera to inverse images via canvas
// http://dev.opera.com/articles/view/html-5-canvas-the-basics/#insertingimages
// and some imagesLoaded stuff from me
// http://gist.github.com/268257
application: yourappid
version: testgaesessions
runtime: python
api_version: 1
handlers:
- url: /stats.*
script: $PYTHON_LIB/google/appengine/ext/appstats/ui.py
- url: /.*
script: main.py
@technoweenie
technoweenie / github_oauth_busy_developer_guide.md
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
@paulirish
paulirish / gist:438326
Created June 14, 2010 21:27
10 things i learned from the jquery source
/*
.d dP"Yb 888888 88 88 88 88b 88 dP""b8 .dP"Y8
.d88 dP Yb 88 88 88 88 88Yb88 dP `" `Ybo."
88 Yb dP 88 888888 88 88 Y88 Yb "88 o.`Y8b
88 YbodP 88 88 88 88 88 Y8 YboodP 8bodP'
@twerth
twerth / gist:510424
Created August 5, 2010 21:40
Skeleton for bash completion ruby script
#!/usr/bin/env ruby
# To use, put this in your bashrc:
# complete -C path/to/script -o default your_command_or_commands_here
# example, to complete the foo and bar commands with the foo.rb script: complete -C ~/bin/foo.rb -o default foo bar
prefix = ARGV[1]
words = `some command here, or just any array`.split.uniq
words = words.select {|w| /^#{Regexp.escape prefix}/ =~ w} if prefix
@mumrah
mumrah / websocketserver.py
Created August 7, 2010 17:01
Simple WebSockets in Python
import time
import struct
import socket
import hashlib
import sys
from select import select
import re
import logging
from threading import Thread
import signal
$ git branch
* master
$ git feature my-new-feature
this will create a feature branch my-new-feature to be merged into master (Y/n): Y
$ git branch
* features/my-new-feature
master
$ # Do some work here, commit it...
$ git finish
this will integrate my-new-feature into master (Y/n): Y
@jeremi
jeremi / fabfile.py
Created November 4, 2010 21:00
A fabfile to manage git+appengine deployement
from __future__ import with_statement
import functools
import os
import sys
from fabric.api import *
from fabric.colors import green, red, green
import datetime
import re
@ruel
ruel / infb.py
Created November 26, 2010 12:07
A script to scrape information from your facebook friends.
#!/usr/bin/python
'''
InFB - Information Facebook
Usage: infb.py user@domain.tld password
http://ruel.me
Copyright (c) 2011, Ruel Pagayon
All rights reserved.
@benschwarz
benschwarz / 1. Making closure an executable.md
Created December 13, 2010 22:37
How to make Google's closure a command line executable for awesomeness
  • Download Closure
  • Place the java jar file within /usr/local/libexec
  • Create /usr/local/bin/closure, copy in the bash script shown below
  • Run chmod +x /usr/local/bin/closure

Enjoy running closure