Skip to content

Instantly share code, notes, and snippets.

View jsherer's full-sized avatar

Jordan Sherer jsherer

View GitHub Profile
@jsherer
jsherer / ptt.sh
Created April 10, 2019 13:50
GPIO Toggle Script for JS8Call
#!/bin/bash
STATE=$1
PIN=12
if [ $# -le 0 ]; then
echo -e "\nUsage:\n$0 state \n"
exit 1
fi
if [ "$STATE" = "on" ]; then
@jsherer
jsherer / Dockerfile
Created July 26, 2017 15:42
Run a Python Project
FROM python:3
WORKDIR /usr/src/app
EXPOSE 80 8000 8080 5000 5001
COPY requirements.txt ./
RUN apt update && apt install -y memcached
RUN pip install --no-cache-dir -r requirements.txt
@jsherer
jsherer / try-to-crash.go
Created June 6, 2014 00:57
This file illustrates a panic in boltdb when lots of keys are deleted in a single transaction
/*
this file illustrates a panic in boltdb when lots of keys are deleted in a single transaction
*/
package main
import (
"encoding/binary"
"log"
"github.com/boltdb/bolt"
@jsherer
jsherer / hstore.py
Created November 23, 2012 15:21 — forked from dahlia/hstore.py
PostgreSQL hstore + SQLAlchemy
""":mod:`hstore` --- Using PostgreSQL hstore with SQLAlchemy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
I released it under Public Domain. Feel free to use!
It provides :class:`Hstore` type which makes you to store Python
dictionaries into hstore columns in PostgreSQL. For example::
@jsherer
jsherer / screenshot-to-dropbox
Created August 17, 2012 13:11 — forked from jasonbouffard/screenshot-to-dropbox
OSX Bash script to snap an interactive screenshot into your Dropbox public folder and copy the public url to your clipboard.
#!/bin/bash
#
# Copyright (c) 2012, Jason Bouffard, Jordan Sherer
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
@jsherer
jsherer / modernizr-test_position_fixed_ios.js
Created July 16, 2012 15:29 — forked from PhilippSoehnlein/modernizr-test_position_fixed_ios.js
Modernizr Test for position fixed (including iOS tests)
/* modernizr-test_position_fixed_ios.js
* Original by Daniel Ott (https://gist.github.com/1333800)
* 3 March 2011
* Updated by Philipp Söhnlein 3 November 2011
* Custom Tests using Modernizr's addTest API
*/
/* iOS
* There may be times when we need a quick way to reference whether iOS is in play or not.
* While a primative means, will be helpful for that.