Skip to content

Instantly share code, notes, and snippets.

View erjjones's full-sized avatar

Eric Jones erjjones

  • Indianapolis, Indiana
View GitHub Profile
@erjjones
erjjones / GooglePlusUserLink.html
Created March 7, 2012 22:28
Google Plus User Link
@erjjones
erjjones / TwitterLink.html
Created March 7, 2012 22:24
Twitter User Link
@erjjones
erjjones / GetGitHubInfoBadExample.js
Created March 7, 2012 21:36
Bad Example: Get Git Hub Account Information (Ajax)
jQuery(document).ready(function() {
$('#gf').text('GitHub Followers');
$('#gfr').text('GitHub Repos');
$.get('https://api.github.com/users/erjjones', function(res) {
var obj = jQuery.parseJSON(res);
if(typeof obj.followers != 'undefined')
{
$('#gf').text(obj.followers + ' GitHub Followers');
@erjjones
erjjones / jsonp-usage.js
Created March 7, 2012 21:13 — forked from sindresorhus/jsonp-usage.js
JSONP function - Easily fetch remote JSONP files
// Example usage: Fetch it's own code from GitHub
JSONP( 'https://api.github.com/users/erjjones?callback=?', function( response ) {
var data = response.data;
console.log(data.followers);
});
@erjjones
erjjones / NodeJsProxy
Created January 25, 2012 21:58
Node.js Proxy
var http = require('http');
http.createServer(function(request, response) {
var proxy = http.createClient(80, request.headers['host'])
var proxy_request = proxy.request(request.method, request.url, request.headers);
proxy_request.addListener('response', function (proxy_response) {
proxy_response.addListener('data', function(chunk) {
response.write(chunk, 'binary');
});
proxy_response.addListener('end', function() {
@erjjones
erjjones / Custom.js
Created December 21, 2011 20:02
Custom.js
jQuery(function () {
var paper = Raphael("graph", 940, 81),
timeline;
timeline = new Timeline(paper, [
{date:"06/25/2004", version:"0.5"},
{date:"12/13/2005", version:"1.0.0"},
{date:"12/07/2007", version:"2.0.0"},
{date:"6/10/2010", version:"3.0 ?"}