Skip to content

Instantly share code, notes, and snippets.

View hoganlong's full-sized avatar

Hogan Long hoganlong

View GitHub Profile
@hoganlong
hoganlong / gist:3108507
Created July 14, 2012 00:44
MakeGetter code
class test
{
public string sam { get; set; }
public int anumber { get; set; }
}
void Main()
{
var z = new test { sam = "sam", anumber = 99};
CREATE TABLE TTable
(
ProjectId INT,
MonthYear DATETIME,
Month VARCHAR(5),
Year INT,
Generation FLOAT,
Expected FLOAT,
CarryOver FLOAT
)
@hoganlong
hoganlong / BitField.SQL
Created February 16, 2012 16:42
Example of BitField in SQL / TSQL / SQLServer
CREATE TABLE [dbo].[testBF](
[field1] [varchar](max) NOT NULL,
[field2] [varchar](max) NOT NULL,
[bitfield] [int] NOT NULL CONSTRAINT [DF_testBF_bitfield] DEFAULT ((0))
) ON [PRIMARY]
INSERT INTO testBF(field1,field2)
VALUES ('F1start1','F2start1');
INSERT INTO testBF(field1,field2)
@hoganlong
hoganlong / gist:1683075
Last active September 29, 2015 23:07
Links to git based blog engines (and others of direct interest)
Blog post on jekyll and gh-pages functionality
http://haacked.com/archive/2013/12/02/dr-jekyll-and-mr-haack/
Balrog
Node based static site generator
https://github.com/jlord/balrog
Example >> https://github.com/jlord/jlord.github.io
GitPress (Python / Node backend)
https://github.com/joeyespo/gitpress
using System;
using System.Text;
namespace testalot
{
public class testa
{
override public string ToString()
{
return ("testa tostring()");
@hoganlong
hoganlong / md5.js
Created February 8, 2010 17:22
MD5 via JavaScript
/**
*
* MD5 (Message-Digest Algorithm)
* http://www.webtoolkit.info/
*
**/
var MD5 = function (string) {
function RotateLeft(lValue, iShiftBits) {
var utilities = function() {
var util = this;
util.log = function(msg){
alert(msg);
};
var p = document.createElement('p');
p.innerHTML = '<input type="checkbox" onclick="util.log(\'hey\')" value="1">Check me'; // this part is a legacy code and I have no control over to rewrite it as HTMLObjectElement way
};
/*
* filterJSON v.9.1 - http://www.jeffrey-way.com
* Last Updated: January 29, 2009
* When you attach a JSON file, it will parse it with getJSON, and then allow you to filter through and display the items on the page according to
* a specified limit, delay, transition, etc.
* Developed by Jeffrey Way
* http://jeffrey-way.com/filterjson-a-jquery-plugin/
* jeffrey@effrey-way.com