This article is now published on my website: Prefer Subshells for Context.
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
// Since Dyn provides no way to export a zone, this extracts the zone data from the "advanced editor" form. | |
// Run this in the console on the editor page, and it will produce a single string. | |
// You may need to clean up the string slightly. Look for hostnames that end with multiple dots and clean those out. | |
dyn_zone_getter = { | |
host: jQuery("#adv_table tr > td:nth-child(1)").map(function(){return $(this).text()}), | |
ttl: jQuery("#adv_table tr > td:nth-child(2) > input").map(function(){return $(this).val()}), | |
type: jQuery("#adv_table tr > td:nth-child(3)").map(function(){return $(this).text()}), | |
data: jQuery("#adv_table tr > td:nth-child(4) > input").map(function(){return $(this).val()}), | |
as_zone: function() { |
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
Xft.dpi: 96 | |
Xft.antialias: true | |
Xft.hinting: true | |
Xft.rgba: rgb | |
Xft.hintstyle: hintslight | |
Xft.lcdfilter: lcddefault | |
URxvt.scrollBar: false | |
URxvt*transparent: false |
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
#!/bin/sh | |
DOWNLOAD_DIR=~/Downloads/weather | |
REGION=txgulf | |
# make download dir if not available | |
if [ ! -d "$DOWNLOAD_DIR" ]; then | |
mkdir -p $DOWNLOAD_DIR | |
fi |
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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
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
# Question: http://www.coinheist.com/rubik/a_regular_crossword/grid.pdf | |
# My Answer: http://sphotos-h.ak.fbcdn.net/hphotos-ak-prn1/534798_4778312810689_972807554_n.jpg | |
import re | |
assert re.match(r'.*H.*H.*', 'NHPEHAS') | |
assert re.match(r'(DI|NS|TH|OM)*', 'DIOMOMTH') | |
assert re.match(r'F.*[AO].*[AO].*', 'FOXNXAXPH') | |
assert re.match(r'(O|RHH|MM)*', 'MMOMMMMRHH') | |
assert re.match(r'.*', 'MCXNMMCRXEM') | |
assert re.match(r'C*MC(CCC|MM)*', 'CMCCCCMMMMMM') |
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 | |
NOUNS = [ | |
'Tomb', 'Castle', 'Dungeon', 'Catacombs', 'Sewers', 'Mansion', 'Cave', 'Mines', | |
'Laboratory', 'Hobble', 'Prison', 'Asylum', 'Stockade', 'Vault', 'Reformatory', | |
'Oubliette', 'Sepulcher', 'Mausoleum', 'Pit', 'Crypt', 'Necropolis', 'Culverts', | |
'Grotto', | |
] | |
ADJECTIVES = [ |
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>mc.admalledd.com help</TITLE> | |
<style type="text/css"> | |
#navbar{ |