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
# Hockey | |
# | |
# A air hockey game for two players. First to | |
# seven wins. | |
# Most of the game is drawn with the scene | |
# module. Goal and winner messages are animated | |
# with layers. | |
from scene import * | |
from sound import * |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> Two Equal Columns in CSS </title> | |
<style type="text/css"> | |
.twoColumns { | |
position: relative; | |
} |
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
// Move out of common paired characters () and [] with `Tab` | |
{ | |
"keys": ["tab"], | |
"command": "move", | |
"args": {"by": "characters", "forward": true}, | |
"context": | |
[ | |
// Check if next char matches (followed by anything) | |
{ "key": "following_text", "operator": "regex_match", "operand": "(:?`|\\)|\\]).*", "match_all": true }, | |
// ...and that there is a paid character before it on the same |
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
pinbook://x-callback-url/add?url=[URL]&title={[TITLE]}&description={[TEXT-SELECTED]}&x-success={mrreader://} |
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
#!/usr/bin/env python | |
import sys, re | |
hours_re = re.compile(r'([-+] \d+)h \b', re.X) | |
total = 0 | |
for line in sys.stdin: | |
total += sum(int(hour) for hour in hours_re.findall(line)) | |
print line.strip() |
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
pinner://x-callback-url/bookmark?x-source=Pinner&href={[URL]}&title={[TITLE]}&extended={[TEXT-SELECTED]}&toread=0&x-success={mrreader://}&x-cancel={mrreader://}&shared=1 |
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
// javascript:(function()%20{if%20(window.___focusInterval)%20{clearInterval(window.___focusInterval);delete%20window.___focusInterval;return;}window.___focusInterval%20=%20setInterval(function()%20{console.debug(document.activeElement);}%2C%202000);})(); | |
// Logs the :focus-ed element every few seconds. This can be helpful when | |
// debugging why the focus is getting lost or is on a visually hidden element. | |
// Toggles the logging on or off. | |
(function() { | |
if (window.___focusInterval) { | |
clearInterval(window.___focusInterval); | |
delete window.___focusInterval; |