Skip to content

Instantly share code, notes, and snippets.

View SpotlightKid's full-sized avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@SpotlightKid
SpotlightKid / README.md
Last active September 22, 2017 07:47 — forked from yloiseau/watson-notify
Watson desktop notifier (Python)

Requirements

Indirect dependencies in parentheses:

  • python-notify2 (python-dbus, python-gi)
  • python-arrow (python-dateutil)
  • Watson (click)

Installation

@SpotlightKid
SpotlightKid / synth.cpp
Created January 17, 2016 21:21 — forked from genericpenguin/synth.cpp
Arduino Synth
/* Arduino Synth from
https://janostman.wordpress.com/2016/01/15/how-to-build-your-very-own-string-synth/
*/
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
@SpotlightKid
SpotlightKid / bobp-python.md
Last active December 2, 2015 20:39 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is always better than functionality." - Pieter Hintjens
@SpotlightKid
SpotlightKid / aurinfohelper.sh
Last active August 29, 2015 14:00
Generate .AURINFO file, create Arch source package and add .AURINFO to it
#!/bin/bash
#
# aurinfohelper.sh
#
process() {
if [ ! -f PKGBUILD ]; then
echo "PKGBUILD not found!"
else
source PKGBUILD
from contextlib import contextmanager
from operator import itemgetter
from sys import argv, stdout
from time import time
@contextmanager
def duration(outfile=stdout):
start = time()
yield
end = time()
from contextlib import contextmanager
from time import time
from sys import stdout
@contextmanager
def duration(outfile=stdout):
start = time()
yield
end = time()
outfile.write(str(end - start) + '\n')
#!/bin/sh
# Inits a project made with the django-cms-boilerplate
# Requires virtualenvwrapper and pip
# Create virtualenv if no active
if [ "$VIRTUAL_ENV" == "" ]; then
echo "Creating virtualenv... Name?"
read venvname
source virtualenvwrapper.sh
mkvirtualenv --no-site-packages $venvname
workon $venvname