Skip to content

Instantly share code, notes, and snippets.

View bkeating's full-sized avatar
🤙
Gettin’ SUM & CALCin’ out

Benjamin Keating bkeating

🤙
Gettin’ SUM & CALCin’ out
View GitHub Profile
@bkeating
bkeating / howto-filemerge-git-osx.md
Created March 11, 2010 21:36
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

@bkeating
bkeating / wordpress-wxr-example.xml
Created February 23, 2011 16:57
A vanilla example of the WordPress WXR Schema. Im using this as a starting point to build my own comments importer for disqus.com
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dsq="http://www.disqus.com/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
<item>
<!-- title of article -->
@bkeating
bkeating / graphiql-dark-mode.css
Last active April 25, 2023 13:31
GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating
<style>
/* GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating[1]
* Colors taken from Atom's One Dark theme[2]. Add this file to the end of
* your <head> block[3] to override built-in default styling.
*
* [1]. https://twitter.com/flowpoke
* [2]. https://github.com/atom/atom/tree/master/packages/one-dark-ui
* [3]. e.g. `.../site-packages/graphene_django/templates/graphene/graphiql.html`
*/
@bkeating
bkeating / GzipSimpleHttpServer.py
Created November 8, 2019 18:25
Python's SimpleHttpServer, but w/Gzip support. 🤙
#!/usr/bin/python
"""Simple HTTP Server.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
__version__ = "0.6"
@bkeating
bkeating / coinbase_auth_example.py
Created August 5, 2014 19:07
GET and POST to Your Coinbase.com account (via API + Secret Key). This is based on the example in their documentation. Adds expires support. Make sure API used has necessary permissions.
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import hashlib
import hmac
import urllib2
import time
import json
@bkeating
bkeating / capture_screenshot.js
Last active September 15, 2021 16:07
Capture a full-page screeenshot of a URL. Taken from Abstractly's dja project.
/**
* Capture a screenshot of a given URL
*
* USAGE: $ node ./capture_screenshot.js my-page-slug 34sdg-252gsg-23dsg-2234 https://mysite.com/my-page-slug/
*
*/
const puppeteer = require("puppeteer");
let pageSlug = process.argv[2];

Lighting structure is separate from it's 'costume'. The lightning is then compatible with any/all festivities and we can encourage the community to decorate/make costumes for them.

The lighting system itself could be made 'intelligent'. They could sparkle as people pass by. Or if it were for halloween, they could play a 'spooky noise' as people pass by. They could be networked together, to put on simple, but coordinated light shows. The color and intensity of the light could play a role too. Think the blue gas light in Milwaukee... Blue on colder nights, Orange when it's warmer.

Ok, here is a thought that's getting out of control... Allow people to interact with the lights via the web (their phones). Each light could have a little 'dance' pattern... Or again, if it's halloween you could allow people to control what it says... as their friends walk by, they could scare them, or play something funny. Oh(!) Valentines day could get really cute with this idea.

Not thinking about the "costume" yet, the lighting

const getserial = () => {
const fs = require('fs');
const content = fs.readFileSync('/proc/cpuinfo', 'utf8');
const cont_array = content.split("\n");
const serial_line = cont_array[cont_array.length-2];
const serial = serial_line.split(":");
return serial[1].slice(1);
}
{
"editor.fontFamily": "OperatorMonoLig-Book",
"editor.fontLigatures": true,
"files.eol": "\n",
"workbench.colorTheme": "One Dark Pro",
"breadcrumbs.enabled": false,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"indentRainbow.tabmixColor": "rgba(128,32,96,0.2)",
"workbench.tree.indent": 20,