Skip to content

Instantly share code, notes, and snippets.

View dsiddy's full-sized avatar

Dan Siddoway dsiddy

  • Spokane, WA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dsiddy on github.
  • I am dsiddy (https://keybase.io/dsiddy) on keybase.
  • I have a public key whose fingerprint is 9DC8 5A16 B531 0855 7FBD 231E 3F77 4E85 4603 0565

To claim this, I am signing this object:

@dsiddy
dsiddy / mario.html
Created June 2, 2017 20:46
round #2 of Code in the Dark Spokane 2017
<html>
<head>
<style>
.container {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: lightblue;
@dsiddy
dsiddy / generate_csv.py
Created September 23, 2016 16:31
generate CSV files from OASIS tables
#!/usr/local/bin/python
from collections import OrderedDict
import csv
import re
csv_file_names = {
'oasis/Pool 1.csv': 'oasis/OASIS_Unrestricted_Contractors_by_Pool - POOL 1.csv',
@dsiddy
dsiddy / hideFacebookFeeds.user.js
Created January 9, 2016 09:20
hide Facebook feeds
// ==UserScript==
// @match https://*.facebook.com/*
// ==/UserScript==
// Thanks to @montavilla for pointing me toward Neal Wu's Chrome extension, Kill News Feed (https://chrome.google.com/webstore/detail/kill-news-feed/hjobfcedfgohjkaieocljfcppjbkglfd), which accomplishes the same thing using jQuery.
function hideFeeds() {
var feedSelectors = [
'div[id^="feed_stream"]',
'#pagelet_trending_tags_and_topics',
@dsiddy
dsiddy / consoleOneLiners.js
Last active December 30, 2015 00:36
console one-liners
// block all tracking domains detected by Privacy Badger
jQuery('#blockedResources .clickerContainer input[id^=block]').each(function(index, element) { $(element).click() });
// Republican presidential debate speaker counts
// @see http://www.nytimes.com/2015/12/16/us/politics/transcript-main-republican-presidential-debate.html
console.log(['PAUL', 'CHRISTIE', 'BUSH', 'CRUZ', 'TRUMP', 'CARSON', 'RUBIO', 'FIORINA', 'KASICH'].map(function(candidate) { return document.querySelector('#story-body').textContent.match(new RegExp(candidate, 'g')).length }));
@dsiddy
dsiddy / hideStarWars.user.js
Last active December 15, 2015 23:11
hide /Star Wars/-related posts on Facebook
// ==UserScript==
// @match https://www.facebook.com/*
// ==/UserScript==
// My very first user script!
// @see https://www.chromium.org/developers/design-documents/user-scripts
// @see http://wiki.greasespot.net/Metadata_Block
// Note that match patterns require a path component. I ran into trouble earlier by leaving off the trailing slash.
// @see https://developer.chrome.com/extensions/match_patterns
@dsiddy
dsiddy / update.sh
Last active December 8, 2015 20:58
update package manager files
#!/bin/bash
for file in {package,bower}.json
do
if [ -f ${file} ]; then
# Warning: this command edits the files in-place.
sed -i '' -e 's|(http://\(.*\))|(https://\1)|' ${file}
fi
done