Skip to content

Instantly share code, notes, and snippets.

@sherzberg
sherzberg / gist:fc56c31ba8447ab7d63af37df22ab705
Last active June 16, 2020 13:14
screenly ose pr4 install fixes
#!/bin/bash -e
if grep -qF "Raspberry Pi 3" /proc/device-tree/model; then
export DEVICE_TYPE="pi3"
elif grep -qF "Raspberry Pi 2" /proc/device-tree/model; then
export DEVICE_TYPE="pi2"
else
export DEVICE_TYPE="pi1"
fi
@sherzberg
sherzberg / roku-block-list.txt
Created September 19, 2019 13:34
roku-block-list.txt
austin.logs.roku.com
cooper.logs.roku.com
giga.logs.roku.com
griffin.logs.roku.com
liberty.logs.roku.com
littlefield.logs.roku.com
logs.roku.com
paolo.logs.roku.com
scribe.logs.roku.com
sugarland.logs.roku.com
@sherzberg
sherzberg / main.tf
Last active June 22, 2016 22:49
DevopsDSM Workshop
resource "digitalocean_ssh_key" "default" {
name = "devbox"
public_key = "${file("id_rsa.pub")}"
}
resource "digitalocean_droplet" "devbox" {
image = "ubuntu-16-04-x64"
name = "dev-spencer"
region = "nyc3"
size = "4gb"
@sherzberg
sherzberg / setup.sh
Last active November 16, 2021 03:26
ubuntu-postinstall
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update -q
sudo apt-get install -y git vim-nox curl htop nmap
sudo apt-get install -y i3 i3lock i3status
sudo apt-get install -y google-chrome-stable
sudo apt-get install -y python-pip
sudo apt-get install -y python-software-properties software-properties-common
sudo apt-get install vagrant
@sherzberg
sherzberg / github-fixed-header.user.js
Last active August 29, 2015 14:18
Github Fixed Header TamperMonkey Script
// ==UserScript==
// @name Github Fixed Header
// @namespace http://github.com/sherzberg
// @version 0.2
// @description This script forces the Github header to be fixed. Very useful for long thread or long file viewing.
// @author Spencer Herzberg
// @match https://github.com/*
// @grant none
// ==/UserScript==
@sherzberg
sherzberg / fullcalendarrssevents.js
Last active August 29, 2015 14:16
fullcalendar RSS based events
function parseRSS(url, callback) {
var fullpath = document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(url);
console.log(fullpath);
jQuery.ajax({
url: fullpath,
dataType: 'jsonp',
success: function (data) {
console.log(data);
callback(data.responseData.feed);
}
@sherzberg
sherzberg / conftest.py
Last active August 29, 2015 14:14 — forked from alexmic/conftest.py
import os
import pytest
from alembic.command import upgrade
from alembic.config import Config
from project.factory import create_app
from project.database import db as _db
@sherzberg
sherzberg / gist:9ea01ef26d052ba80d15
Last active August 29, 2015 14:08
WRTNode Setup
Some notes on WRTNode setup for USB sticks and python development
https://forum.openwrt.org/viewtopic.php?id=10244
http://h-wrt.com/en/doc/flash
http://flexget.com/wiki/InstallWizard/OpenWrt
http://www.cnx-software.com/2014/09/18/wrtnode-quick-start-guide/
@sherzberg
sherzberg / keybase.md
Last active October 12, 2017 14:52
keybase.md

Keybase proof

I hereby claim:

  • I am sherzberg on github.
  • I am sherzberg (https://keybase.io/sherzberg) on keybase.
  • I have a public key ASDTVZF1HPNSbsjorOf6ZktGhF4j8cd5YJsq3mPnKku1Dgo

To claim this, I am signing this object:

@sherzberg
sherzberg / tupperware.py
Last active September 28, 2019 08:29 — forked from floer32/tupperware.py
from UserDict import IterableUserDict
import collections
def tupperware(mapping):
""" Convert mappings to 'tupperwares' recursively.
Lets you use dicts like they're JavaScript Object Literals (~=JSON)...
It recursively turns mappings (dictionaries) into namedtuples.
Thus, you can cheaply create an object whose attributes are accessible