Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Ryan Balfanz RyanBalfanz

🎯
Focusing
View GitHub Profile
View keys.pub GitHub signed message
BEGIN MESSAGE.
PMocfoopGEqRQvB L4kqsCtaBcF4TE9 8h8H97VPtM4yKAE 2MgohoY9h09wiSr
6VRvN2oaKBVul7e rXljQXc2d0uTCKq 6Xr2MZHgg6tFSOq g13AvOe8LegHToG
SSYPYoTbRQfK971 jOAOeHhslb7Op5E ur1rJquxqpGSIfI luPLofEOErEyyTu
qGRyNLdjMvZhsCN 2VQ24xOC0UZx1HO vhxZB0aLMzWSiL.
END MESSAGE.
@RyanBalfanz
RyanBalfanz / index.html
Created Jan 2, 2019
Analog Clock for ARTIFACT
View index.html
<!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");
View keybase.md

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 Jul 8, 2016 — forked from Morreski/serve.py
Python SimpleHTTPServer for Static Serving (React / Angular / Ember) in HTML5 mode (a la mod_rewrite)
View serve.py
'''
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 / upload.py
Last active Nov 14, 2020
[Heroku] Direct to S3 File Uploads in Python
View upload.py
"""
Fix for some issues with the original code from Heroku:
https://devcenter.heroku.com/articles/s3-upload-python
This example is also designed for use with Django, not Flask as in the original.
"""
import base64
import hashlib
import hmac
@RyanBalfanz
RyanBalfanz / Arch_Linux_Raspberry_Pi.md
Last active Aug 29, 2015
Arch Linux fresh install on Raspberry Pi
View Arch_Linux_Raspberry_Pi.md

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

@RyanBalfanz
RyanBalfanz / Makefile
Created Jul 30, 2013
Boggle Solver in Python
View Makefile
profile:
python -m cProfile foo.py < board_3.txt
@RyanBalfanz
RyanBalfanz / ico2cur.py
Created Apr 12, 2012
Convert an ICO file to a CUR file
View ico2cur.py
#!/usr/bin/env python
# coding: utf-8
from optparse import OptionParser
import sys
usage = """%prog infile [options]
Reads an ICO file and writes a CUR file. The ICO file should contain a single
image. If no outfile name is provided, the infile name is used to create an
@RyanBalfanz
RyanBalfanz / pip_upgrade_all.py
Created Apr 9, 2012
pip install -U ALL_THE_THINGS
View pip_upgrade_all.py
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"
View chart.css
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;
You can’t perform that action at this time.