Navigation Menu

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 / JekyllListAllPosts.html
Created March 8, 2012 03:22
Jekyll List All Posts
{% for post in site.posts %}
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<p><small><strong>{{ post.date | date: "%B %e, %Y" }}</strong> . {{ post.category }} . <a href="http://erjjones.github.com{{ post.url }}#disqus_thread"></a></small></p>
{% endfor %}
@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 / JekyllPagination.html
Created March 8, 2012 03:33
Jekyll Pagination
<div class="span9 column">
<p class="pull-right">{% if page.previous.url %} <a href="{{page.previous.url}}" title="Previous Post: {{page.previous.title}}"><i class="icon-chevron-left"></i></a> {% endif %} {% if page.next.url %} <a href="{{page.next.url}}" title="Next Post: {{page.next.title}}"><i class="icon-chevron-right"></i></a> {% endif %} </p>
</div>
@erjjones
erjjones / Jekyll-Tags-List-Site.html
Created March 22, 2012 02:40
Jekyll-Tags-List-Site
<ul>
{% for tag in site.tags %}
<li><a href="/tags/{{ tag[0] }}">{{ tag[0] }}</a></li>
{% endfor %}
</ul>
@erjjones
erjjones / TwitterLink.html
Created March 7, 2012 22:24
Twitter User Link
@erjjones
erjjones / electric_imp_system_ping
Last active December 11, 2015 20:38
Awake Imp post JSON payload
function getDateTime(){
local d = date();
local datestring = format("%04d-%02d-%02dT%02d:%02d:%02d", d.year, d.month+1, d.day, d.hour, d.min, d.sec); //ISO 8601
return datestring;
}
class RespInput extends InputPort
{
name = "response";
type = "string";
@erjjones
erjjones / electric_imp_system_light
Created January 19, 2013 16:35
Electric Imp System Light
////////////////////
/// System Light ///
////////////////////
ledState <- 0; // Variable to represent LED state
inhibit <- 0; // Variable to represent LED inhibit state
hardware.pin9.write(1); // System Light
// input class for LED control channel
@erjjones
erjjones / fuelux-template.html
Created October 23, 2012 16:45
FuelUX Template
<!DOCTYPE html>
<html class="fuelux" lang="en"> <!-- FuelUX attribute -->
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="http://fuelux.exacttargetapps.com/fuelux/2.0/css/fuelux.css" rel="stylesheet" /> <!-- FuelUX CDN link to core css -->
@erjjones
erjjones / first_post.html
Created September 5, 2012 16:37
Get First Post Ruby
{% assign first_post = site.posts.first %}
{{ first_post.title }}
{{ first_post.date | date: "%B %e, %Y" }}
{{ first_post.summary }}
{% for post in site.posts offset: 1 limit: 50 %}
{{ post.title }}
{{ post.date | date: "%B %e, %Y" }}
{% for tag in post.tags %}
@erjjones
erjjones / ContactsSelCollection.sql
Created August 29, 2012 14:58
Sample Get Collection Store Procedure
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE ContactsSelCollection
@Page INT = NULL,
@PageSize INT = NULL,
@Sort NVARCHAR(45) = NULL,
@Direction BIT = NULL,