Skip to content

Instantly share code, notes, and snippets.

View RyanBalfanz's full-sized avatar
🎯
Focusing

Ryan Balfanz RyanBalfanz

🎯
Focusing
View GitHub Profile
@RyanBalfanz
RyanBalfanz / Arch_Linux_Raspberry_Pi.md
Last active August 29, 2015 14:02
Arch Linux fresh install on Raspberry Pi

Prepare the SD Card:

➜  Downloads  time sudo dd bs=1m if=ArchLinuxARM-2014.06-rpi.img of=/dev/rdisk1
1870+0 records in
1870+0 records out
1960837120 bytes transferred in 132.563127 secs (14791723 bytes/sec)
sudo dd bs=1m if=ArchLinuxARM-2014.06-rpi.img of=/dev/rdisk1  0.01s user 0.90s system 0% cpu 2:12.58 total

Update and Install Additional Packages

import random
class Markov(object):
def __init__(self, open_file):
self.cache = {}
self.open_file = open_file
self.words = self.file_to_words()
self.word_size = len(self.words)
self.database()
#!/usr/bin/env python
# encoding: utf-8
"""
FileChunker.py
Created by Ryan Balfanz on 2009-11-19.
Copyright (c) 2009 Ryan Balfanz. All rights reserved.
"""
import fileinput
@RyanBalfanz
RyanBalfanz / arduino-python.py
Created June 10, 2011 06:20
Arduino-Python
import logging
import random
import sys
import time
from arduino import Arduino
logging.basicConfig(level=logging.DEBUG)
def setup_board(device=None, outputPins=None):
@RyanBalfanz
RyanBalfanz / chart.css
Created August 18, 2011 23:02
Goodbye-Mint
html {
height: 100%;
-webkit-box-shadow: inset 0 0 20px 0 rgba(0,0,0,0.2);
-moz-box-shadow: inset 0 0 20px 0 rgba(0,0,0,0.2);
-webkit-font-smoothing: antialiased;
padding: 0;
margin: 0;
font-family: 'HelveticaNeue', Helvetica, Arial Sans-serif;
font-size: 13px;
color: #555555;
@RyanBalfanz
RyanBalfanz / pip_upgrade_all.py
Created April 9, 2012 23:13
pip install -U ALL_THE_THINGS
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
try:
call("pip install --upgrade " + dist.project_name, shell=True)
except Exception as e:
print "Caught Exception: {error}".format(error=e)
print "Dunzo"
@RyanBalfanz
RyanBalfanz / Makefile
Created July 30, 2013 19:27
Boggle Solver in Python
profile:
python -m cProfile foo.py < board_3.txt
@RyanBalfanz
RyanBalfanz / keybase.md
Created September 10, 2016 01:11
Keybase proof

Keybase proof

I hereby claim:

  • I am RyanBalfanz on github.
  • I am balfanz (https://keybase.io/balfanz) on keybase.
  • I have a public key whose fingerprint is 7A83 C820 DCA9 470B F140 9C93 02EE DA51 A78E E78E

To claim this, I am signing this object:

@RyanBalfanz
RyanBalfanz / serve.py
Created July 8, 2016 07:47 — forked from Morreski/serve.py
Python SimpleHTTPServer for Static Serving (React / Angular / Ember) in HTML5 mode (a la mod_rewrite)
'''
Taken from:
http://stackoverflow.com/users/1074592/fakerainbrigand
http://stackoverflow.com/questions/15401815/python-simplehttpserver
'''
import sys
import os
if sys.version_info < (3,):
import SimpleHTTPServer as server
@RyanBalfanz
RyanBalfanz / index.html
Created January 2, 2019 20:59
Analog Clock for ARTIFACT
<!DOCTYPE html>
<html>
<body>
<canvas id="canvas" width="400" height="300" style="background-color:#333"></canvas>
<script>
console.info('Adapted for ARTIFACT from https://www.w3schools.com/graphics/canvas_clock_start.asp');
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");