This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urequests | |
import base64 | |
with open("config.json") as fp: | |
config = json.load(fp) | |
if config['key'] is None: | |
raise KeyError("No twitter API key") | |
if config['secret'] is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Specifically for use with the Adafruit Feather, the pins are pre-set here! | |
// include SPI, MP3 and SD libraries | |
#include <SPI.h> | |
#include <SD.h> | |
#include <Adafruit_VS1053.h> | |
#include "config.h" // not included here, but the standard config.h file used with io.adafruit.com | |
AdafruitIO_Feed *knock = io.feed("knock"); | |
AdafruitIO_Feed *hello = io.feed("hello"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// variables | |
let soundsOn = true // false if you don't want any sounds | |
let modifier = 100 // lower == harder | |
// the game flow | |
light.pixels.clear() | |
startUp() | |
let rounds = playGame(modifier) | |
serial.writeLine("rounds: " + rounds.toString()) | |
endGame(soundsOn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Time.h> | |
#include <TimeLib.h> | |
#include <TimeAlarms.h> | |
int greenLED = 5; | |
int redLED = 7; | |
#define TIME_MSG_LEN 11 // time sync to PC is HEADER followed by Unix time_t as ten ASCII digits | |
#define TIME_HEADER 'T' // Header tag for serial time sync message | |
#define HMS_MSG_LEN 6 // time sync to PC is HEADER followed by HHMMSS as digits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from copy import deepcopy | |
# create the set of cards (2-10, JQKA) x4. suits don't matter. | |
deck = [x for x in xrange(2, 15)] * 4 | |
# translate the numerical value to the string | |
def to_card(i): | |
if i == 11: | |
return 'J' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Overcast Politics | |
// @namespace http://danconley.net | |
// @version 0.1 | |
// @description Sort podcasts by group | |
// @author Dan Conley | |
// @match https://overcast.fm/podcasts | |
// @grant none | |
// @require http://code.jquery.com/jquery-1.11.3.min.js | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
set autoindent | |
set cindent | |
set smartindent | |
set number | |
set hlsearch | |
set so=2 | |
set clipboard=unnamed | |
set cursorline | |
highlight CursorLine cterm=NONE ctermbg=darkgrey ctermfg=None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set colors | |
set-option -g default-terminal "screen-256color" | |
# Set reload key to r | |
bind r source-file ~/.tmux.conf | |
# Use vim bindings | |
setw -g mode-keys vi | |
# copy/paste |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
classname = "" | |
keystate = "" | |
+Capslock::Capslock | |
CapsLock:: | |
WinGetClass, classname, A | |
if (classname = "PuTTY" or classname = "Vim") | |
{ | |
send,{Esc down} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am Sigafoos on github. | |
* I am dconley (https://keybase.io/dconley) on keybase. | |
* I have a public key whose fingerprint is C8E9 642A F731 3631 1294 6A0B 1EF8 32E1 2866 4DA0 | |
To claim this, I am signing this object: |
NewerOlder