Skip to content

Instantly share code, notes, and snippets.

View hoganlong's full-sized avatar

Hogan Long hoganlong

View GitHub Profile
(function($) {
var originalXhr = $.ajaxSettings.xhr;
$.ajaxSetup({
progress: $.noop,
xhr: function() {
var req = originalXhr(), that = this;
if (req) {
if (typeof req.addEventListener == "function") {
req.addEventListener("progress", function(evt) {
that.progress(evt);
000
00100
0010100
space: 00101010
00101011
001011
00110
00111000
burger: 00111001
0011101
bacon: 10010000
space: 00101010
pong: 10000001
simone: 11010011
eightbit: 01010011
song: 11011011
synth: 10001000
ascii: 01111111
bowling: 01110101
rocket: 01000101
@hoganlong
hoganlong / dabblet.css
Last active December 11, 2015 13:48 — forked from LeaVerou/dabblet.css
/**
* Clip image to hexagon
*/
img {
max-width: 200px;
max-height: 200px;
}
@hoganlong
hoganlong / test.cs
Last active December 11, 2015 00:59
Testing some different ways to check type vs property. IS wins. (yay?)
class TestMe
{
public string test = "test";
}
void Main()
{
List<TestMe> aList = new List<TestMe>();
for (int index = 0; index < 10000000;index++)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using PropertyInfo = System.Reflection.PropertyInfo;
/*
void Main()
{
List<offer> OfferList = new List<offer>() {
new offer() { id=1, f=new DateTime(2011,1,1), t=new DateTime(2011,1,31),status=true},
new offer() { id=1, f=new DateTime(2011,2,1), t=new DateTime(2011,2,28), status=false},
new offer() { id=2, f=new DateTime(2011,2,1), t=new DateTime(2011,2,28), status=false},
new offer() { id=3, f=new DateTime(2011,1,1), t=new DateTime(2011,1,31), status=true },
new offer() { id=3, f=new DateTime(2011,1,1), t=new DateTime(2011,1,26), status=true },
new offer() { id=4, f=new DateTime(2011,1,1), t=new DateTime(2011,1,31), status=true },
new offer() { id=1, f=new DateTime(2011,3,1), t=new DateTime(2011,3,31), status=false},
@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 / 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