Skip to content

Instantly share code, notes, and snippets.

View GeorgeHahn's full-sized avatar
🚴‍♂️
🦀🦀🦀

George Hahn GeorgeHahn

🚴‍♂️
🦀🦀🦀
  • Colorado, USA. U+1F3D4
View GitHub Profile
@GeorgeHahn
GeorgeHahn / 1288.user.js
Last active August 29, 2015 13:56 — forked from clsr/1288.user.js
// ==UserScript==
// @name xkcd 1288 substitutions
// @namespace http://github.com/mcef
// @description Substitutions that make reading the news more fun
//
// @include *
// @exclude *github.com/*
// ==/UserScript==
(function() {
@GeorgeHahn
GeorgeHahn / SignalCapture.cs
Created April 1, 2014 07:18
Capture timing data for a signal on one pin of a Netduino
using System.Threading;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
namespace Analyzer
{
public class Program
{
public static void Main()
{
@GeorgeHahn
GeorgeHahn / importer.cs
Last active August 29, 2015 14:18
HAM Radio Test Question Anki Importer
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace FCC2Anki
@GeorgeHahn
GeorgeHahn / ripslides.js
Created May 14, 2015 08:00
Download Slideshare slide sets for which saving has been disabled
// Browser must be ignoring CORS
// Chrome: Disable web security
// Firefox: Requires proxy or Cors Everywhere extension (https://github.com/spenibus/cors-everywhere-firefox-addon)
function loadScript(url, callback)
{
// Adding the script tag to the head as suggested before
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
@GeorgeHahn
GeorgeHahn / latebound.cs
Created April 12, 2013 06:25
The goal is to be able to iterate over an array of Shape and have different render methods called depending on the type of the current Shape. Additionally, I would like to retain the ability to add different Render classes in the future.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UpconvertSharp
{
class Program
{
@GeorgeHahn
GeorgeHahn / RouteyThingey.cpp
Last active December 16, 2015 11:59
Fun with C++11
#include <string>
#include <functional>
#include <stdio.h>
using namespace std;
// Need to create one class each to pass in and out
typedef int (*fp)(int);
class RouteyThingy
{
@GeorgeHahn
GeorgeHahn / Anotar\NLogFody\LogForwardingProcessor.cs
Last active December 17, 2015 20:19
Adding dynamic support
using System;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Rocks;
using Mono.Cecil.Cil;
public class LogForwardingProcessor
{
public MethodDefinition Method;
/*
ADC128S022
12 bits: 0.806 mV/lsb (3.3v), 1.22 mV/lsb (5v)
Bandwidth: 8MHz (3.3v), 11MHz (5v)
ESP8266 SPI pins are hardcoded to the following:
SS – D8, MOSI – D7, MISO – D6, SCK – D5
*/
#include "SPI.h"
@GeorgeHahn
GeorgeHahn / spi.js
Last active May 7, 2016 01:42
Enhanced SPI decoder for OLSFront
include('util/obj_struct.js');
//////////////////////////////////////////////////////////////////////////////////////////////////
// Parser Info
//////////////////////////////////////////////////////////////////////////////////////////////////
function info()
{
parser.name = 'SPI';
parser.descr = 'SPI Parser';