This file contains hidden or 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
(function(){ | |
var nodes=document.body.getElementsByTagName('*'); | |
for (var i=0; i<nodes.length; i++) { | |
if (nodes[i].style) { | |
cs = getComputedStyle(nodes[i]); | |
if (cs.textAlign == "left" || cs.textAlign == "start") { | |
nodes[i].style.textAlign = "justify"; | |
} | |
} | |
} |
This file contains hidden or 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
(function(){ | |
var nodes=document.body.getElementsByTagName('*'); | |
for (var i=0; i<nodes.length; i++) { | |
if (nodes[i].style) nodes[i].style.fontFamily="Georgia, Utopia, \"Palatino Linotype\", Palatino, serif"; | |
} | |
})() |
This file contains hidden or 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
(function(){ | |
function getColor(tag) { | |
m = tag.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i); | |
if ( m ) | |
return [parseInt(m[1]),parseInt(m[2]),parseInt(m[3]),255]; | |
m = tag.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i); | |
return m ? [parseInt(m[1]),parseInt(m[2]),parseInt(m[3]),parseInt(m[4])] : null; | |
} | |
function realBackgroundColor(elem) { |
This file contains hidden or 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
from time import time | |
import sys | |
import random | |
players = ["A","M","R"] | |
random.shuffle(players) | |
decode1 = [ (0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1), (2,1,0) ] | |
serves = [ 0 for i in range(3*6) ] | |
singles = [ 2 for i in range(6) ] + [ 0 for i in range(6) ] + [ 2 for i in range(6) ] |
This file contains hidden or 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 re | |
import os | |
import sys | |
from subprocess import Popen, PIPE, DEVNULL | |
import threading | |
CHROME = sys.argv[1] | |
DATA = sys.argv[2] | |
MMS_DIR = DATA + "/Default/Pepper Data/Shockwave Flash/System" | |
MMS = MMS_DIR + "/mms.cfg" |
This file contains hidden or 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 re | |
with open("c:/chrome-with-flash-session/chrome_debug.log") as f: | |
with open("c:/chrome-with-flash-session/Default/Pepper Data/Shockwave Flash/System/mms.cfg", "a+") as out: | |
out.write("\n") | |
def add(url): | |
print(url) | |
out.write("AllowListUrlPattern="+url+"\n") | |
for line in f: |
This file contains hidden or 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
digits = """xxx | |
x.x | |
x.x | |
x.x | |
xxx | |
.x. | |
xx. | |
.x. | |
.x. |
This file contains hidden or 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
count = 1 | |
def rev(x): | |
out = 0 | |
for i in range(5): | |
out <<= 1 | |
out |= x&1 | |
x >>= 1 | |
return out | |
This file contains hidden or 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
TIA 0 | |
TIY 0 | |
zeroLoop: | |
AM | |
AIY 1 | |
CIY F | |
JUMP zeroLoop | |
mainLoop: | |
TIA 1 | |
TIY -1 |
This file contains hidden or 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
#!/usr/bin/python | |
# based on : www.daniweb.com/code/snippet263775.html | |
import math | |
import wave | |
import struct | |
# Audio will contain a long list of samples (i.e. floating point numbers describing the | |
# waveform). If you were working with a very long sound you'd want to stream this to | |
# disk instead of buffering it all in memory list this. But most sounds will fit in | |
# memory. |