Skip to content

Instantly share code, notes, and snippets.

Jason Emerick jemerick

Block or report user

Report or block jemerick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jemerick on github.
  • I am jemerick (https://keybase.io/jemerick) on keybase.
  • I have a public key whose fingerprint is B6EB D040 B991 918F E987 90A5 890E 35B9 C88A 0A1A

To claim this, I am signing this object:

View switch.py
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(16, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
input_state = GPIO.input(16)
if input_state == False:
View stepper.py
# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
import time
import click
class Stepper():
"""
"""
@jemerick
jemerick / README.md
Last active Jan 15, 2016 — forked from StefanWallin/README.md
nginx ssl config with multiple SNI vhosts and A+ SSL Labs score as of 2014-11-05
View README.md

Configuring nginx for SSL SNI vhosts

Gotchas

Remarks

  • My version of konklones SSL config does not have SPDY support(my nginx+openssl does not support it)
  • You need a default ssl server (example.org-default.conf).
  • Some SSL-options have to be unique across your instance, so it's easier to have them in a common file(ssl.conf).
@jemerick
jemerick / 4state.xml
Created Aug 19, 2015
4-State Challenge Waypoints
View 4state.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="GPS TrackMaker" version="1.1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<!-- SHELTERS -->
<wpt lat="39.359891939" lon="-77.661743153">
<name>SH EDGAR</name>
<cmt>Ed Garvey Shelter</cmt>
<sym>Waypoint</sym>
</wpt>
<wpt lat="39.412662687" lon="-77.637042514">
<name>SH CRMPG</name>
View keybase.md

Keybase proof

I hereby claim:

  • I am jemerick on github.
  • I am jemerick (https://keybase.io/jemerick) on keybase.
  • I have a public key whose fingerprint is 8BD6 32E8 D73E 6158 C11E DD43 A212 8EFE F6B8 0398

To claim this, I am signing this object:

@jemerick
jemerick / gist:9536094
Created Mar 13, 2014 — forked from kevingessner/gist:9509148
Responsive email template
View gist:9536094
<html>
<head>
<style type="text/css">
table table {
width: 600px !important;
}
table div + div { /* main content */
width: 65%;
float: left;
}
View BindingAdapter.java
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
/** An implementation of {@link BaseAdapter} which uses the new/bind pattern for its views. */
public abstract class BindableAdapter<T> extends BaseAdapter {
private final Context context;
private final LayoutInflater inflater;
View precompresscssjswebfont.sh
#!/bin/bash
# note: this won't work too well with filenames/directories with spaces in them
compressresource() {
gzip -c9 "$1" > "$1.gz"
touch -c --reference="$1" "$1.gz"
echo "Compressed: $1 > $1.gz"
}
@jemerick
jemerick / json-response.py
Created Oct 6, 2011 — forked from leah/json-response.py
JSONResponse classes
View json-response.py
import re
import simplejson
from django.http import HttpResponse
from django.conf import settings
class JSONResponse(HttpResponse):
def __init__(self, request, data):
indent = 2 if settings.DEBUG else None
You can’t perform that action at this time.