Skip to content

Instantly share code, notes, and snippets.

View bluesaunders's full-sized avatar

Brendan Saunders bluesaunders

  • Accepting Opportunities
  • Greater Tampa Bay Area, FL
  • 08:00 (UTC -04:00)
View GitHub Profile
@bluesaunders
bluesaunders / Arduino_LCD_Game.cpp
Last active January 14, 2019 06:49
code for an Arduino based jump game, displayed on a 16x2 LCD.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 2, 3, 4, 5);
const byte btnPin = 13;
const unsigned long debounceTime = 10; // milliseconds
const byte screenWidth = 16;
const byte screenHeight = 2;
// game constants
import random
graph = [(8, 16), (8, 18), (16, 17), (18, 19), (3, 17), (13, 17), (5, 13),(3, 4), (0, 18), (3, 14), (11, 14), (1, 8), (1, 9), (4, 12), (2, 19), (1, 10), (7, 9), (13, 15), (6, 12), (0, 1), (2, 11), (3, 18), (5, 6), (7, 15), (8, 13), (10, 17)]
traversal = []
def build_connections(graph):
flattened_nodes = [node for edge in graph for node in edge]# [1, 2, 2, 3, 3, 1]
unique_nodes = list(set(flattened_nodes))# [1, 2, 3]
connections = dict()
@bluesaunders
bluesaunders / gist:3170735
Last active October 7, 2015 13:18
CloudApp direct link Alfred extension
curl `pbpaste` | grep 'id="show-original-link"' | sed 's/^.*<li><a href="//' | sed 's/".*$//' | pbcopy