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 / 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,
@erjjones
erjjones / ContactsTest.sql
Created August 29, 2012 04:05
Sample Contacts Testing Script
DECLARE @Count int, @Sort NVARCHAR(45), @Direction BIT, @Page INT, @PageSize INT
/* ---------------------------------------
USE THE VARIABLES BELOW TO TEST
CHANGE THEM TO SEE HOW THE RESULT
SET CHANGES ...
--------------------------------------- */
SET @Sort = 'FirstName'
SET @Direction = 0 -- ASC = 1, DESC = 0 OR NULL
@erjjones
erjjones / Contacts.sql
Created August 29, 2012 04:04
Sample Contacts Table for the Get Collection Store Procedure
CREATE TABLE dbo.Contacts (
ContactID int IDENTITY (1,1) NOT NULL,
FirstName nvarchar(64) NULL,
LastName nvarchar(64) NULL,
Phone nvarchar(50) NULL,
[Address] nvarchar(128) NULL,
City nvarchar(50) NULL,
[State] nvarchar(50) NULL,
Zip nvarchar(50) NULL,
Country nvarchar(128) NULL,
@erjjones
erjjones / ContactsPrimeScript.sql
Created August 29, 2012 04:03
Sample Prime Script for the Contacts Example
DECLARE @Date SMALLDATETIME,
@NumberOfContacts INT,
@Cntr INT,
@ContactID INT,
@FirstName NVARCHAR(64),
@LastName NVARCHAR(64)
/* ------------------------------------- */
/* -- DEFINE THE NUMBER OF CONTACTS ---- */
/* ------------------------------------- */
@erjjones
erjjones / Jekyll-Post-Config.html
Created March 22, 2012 03:01
Jekyll-Post-Config
---
layout: post
title: Part two on how I built my blog
category: Coding
tags: jekyll github rss
year: 2012
month: 3
day: 22
published: true
summary: A follow up post on how I built my blog
@erjjones
erjjones / Jekyll-Tags-List-Post.html
Created March 22, 2012 02:41
Jekyll-Tags-List-Post
<i class="icon-tags"></i> {% for tag in page.tags %} <a href="/tags/{{ tag }}" title="View posts tagged with &quot;{{ tag }}&quot;"><u>{{ tag }}</u></a> {% if forloop.last != true %} {% endif %} {% endfor %}
@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>