View maze.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import sys | |
import time | |
while True: | |
sys.stdout.write(random.choice([u'╱',u'╲'])) | |
sys.stdout.flush() | |
time.sleep(0.01) |
View gist:76154591dd63eae0b68a24ac3eec6dc1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jfktrey on github. | |
* I am jfktrey (https://keybase.io/jfktrey) on keybase. | |
* I have a public key whose fingerprint is 9AD5 57DD C056 9938 865A 707A 5AC8 BC22 6974 F906 | |
To claim this, I am signing this object: |
View svg_html2canvas.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Work around an annoying issue in Chrome where SVG images aren't drawn with respect to globalAlpha | |
window.CanvasRenderingContext2D.prototype.drawSvgImage = function(image, x, y, w, h) { | |
var canvas = document.createElement('canvas'); | |
canvas.width = w; | |
canvas.height = h; | |
var context = canvas.getContext('2d'); | |
context.drawImage(image, 0, 0, w, h); | |
this.drawImage(canvas, x, y, w, h); | |
} |
View getch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import platform | |
if platform.system() == "Windows": | |
import msvcrt | |
def getch(): | |
return msvcrt.getch() | |
else: | |
import tty, termios, sys | |
def getch(): | |
fd = sys.stdin.fileno() |
View b3b7.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h = (n = prompt("in base-3: ")).length - 1; | |
b = +(o = []); | |
l = (m = Math).log; | |
for(i = h; i + 1; i--) b += m.pow(3,i) * n[h - i]; | |
for(p = (b + "").length * l(10) / l(7) | 0; p+1;) | |
o.push(b / m.pow(7, p--) | 0), | |
b -= o[o.length - 1] * m.pow(7, p+1); |
View gist:6026314
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR /B > list.txt |
View gist:6026313
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.exe --app="file:///%CD%/index.html" |