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 / 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 / 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 / GooglePlusUserLink.html
Created March 7, 2012 22:28
Google Plus User Link
@erjjones
erjjones / JekyllRedditButton.html
Created March 7, 2012 22:44
Jekyll Reddit Button
<script type="text/javascript" src="http://www.reddit.com/buttonlite.js?i=2&styled=off&url=http://erjjones.github.com{{ page.url }}&newwindow=1"></script>
@erjjones
erjjones / Disqus.html
Created March 8, 2012 02:02
Disqus Code Block
<!-- This is the actual comments section -->
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'erjjones'; // required: replace example with your forum shortname
var disqus_identifier = '{{ page.url }}';
var disqus_url = 'http://erjjones.github.com{{ page.url }}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
@erjjones
erjjones / JekyllSampleHeader.html
Created March 8, 2012 03:42
Jekyll Sample Header
---
layout: post
title: How I built my blog in one day
category: Coding
---
<!-- Put your html, css, and javascript here and below -->
@erjjones
erjjones / DisqusComments.html
Created March 13, 2012 01:45
ResolvedDisqusCommentsCounter
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'ericjones'; // required: replace example with your forum shortname
var disqus_identifier = '{{ page.url }}';
var disqus_url = 'http://erjjones.github.com{{ page.url }}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
@erjjones
erjjones / readme.html
Created March 13, 2012 03:11
ReadMeMd
## Erjjones.Github.com
This is my GitHub user page made with Jekyll, and Twitter Bootstrap. Download it, fork it, follow it, give it away...
Have any feedback for me? [File an issue on this
project](https://github.com/erjjones/Feedback/issues/new) and I will get back to
you as soon as I can.
@erjjones
erjjones / atom.xml
Created March 13, 2012 02:49
SetupRSSfeed
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Eric Jones</title>
<link href="http://erjjones.github.com/atom.xml" rel="self"/>
<link href="http://erjjones.github.com/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
@erjjones
erjjones / tag_gen.rb
Created March 22, 2012 02:04
Jekyll-Tags
module Jekyll
class TagIndex < Page
def initialize(site, base, dir, tag)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)