Skip to content

Instantly share code, notes, and snippets.

View ianthekirkland's full-sized avatar

Ian Kirkland ianthekirkland

View GitHub Profile
@ianthekirkland
ianthekirkland / fb_jk_scroll.user.js
Created August 12, 2012 01:13 — forked from horimislime/fb_jk_scroll.user.js
Scrolls Facebook wall posts with j/k key
// ==UserScript==
// @name fb_jk_scroll
// @version 0.1
// @description Scrolls wall posts with j/k key
// @include http://www.facebook.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
// ==/UserScript==
$(document).ready(function(){

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:
@ianthekirkland
ianthekirkland / Example for Team
Created August 12, 2012 01:06
Browser & Device detection
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>YOUR COMPANY</title>
<link media="all" rel="stylesheet" type="text/css" href="css/all.css">
<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="js/jquery.main.js"></script>
<!--[if lt IE 8]><link rel="stylesheet" type="text/css" href="css/ie.css" /><![endif]-->
<script type="text/javascript">//<![CDATA[
@ianthekirkland
ianthekirkland / wp_mangler.rb
Created August 12, 2012 01:05 — forked from ttscoff/wp_mangler.rb
wp_mangler: runs a replace on WordPress post content
#!/usr/bin/env ruby
# Requires 'sequel' and 'mysql' rubygems
require 'rubygems'
require 'sequel'
require 'cgi'
def e_sql(str)
str.to_s.gsub(/(?=[\\])/, "\\")
end