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/python | |
# Tag mp3, ogg, and flac files with a 'created' tag in the format 'YYYYMMDD', | |
# based on the file's birthtime, as stored by Windows. Unix doesn't store | |
# birthtimes, so this won't work there. | |
import os | |
import sys | |
from time import strftime, localtime | |
import mutagen # v1.21 works. Others probably do, too. |
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
# Reverse order and control placement of the incoming args. | |
echo hi there bud | xargs -n 3 sh -c 'echo $2 $1 $0;' |
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
*background: #101f2f | |
*foreground: #80aad5 | |
*color0: #323b44 | |
*color8: #464f58 | |
*color1: #8c4b4b | |
*color9: #8c4b4b | |
*color2: #4b8c4b | |
*color10: #4b8c4b | |
*color3: #8c8c4b | |
*color11: #8c8c4b |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,07,00,00,00,36,00,3a,00,2e,e0,5c,e0,\ | |
30,e0,5d,e0,10,e0,44,00,22,e0,57,00,19,e0,58,00,00,00,00,00 |
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/python | |
# Recursively print files created before/at/after (-//+) some number of days | |
# ago. This only works on Windows, which stores file "birthtime" in the | |
# filesystem | |
import sys | |
import os | |
from datetime import date, timedelta |
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
class VimFormatter | |
RSpec::Core::Formatters.register self, :example_failed, :example_passed, :dump_summary | |
def initialize(output) | |
@output = output | |
end | |
def example_passed(n) | |
@output << "PASSED: " << n.example.description << "\n\n" | |
end |
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 bash | |
# Monitor a command's output for changes. | |
set -eu | |
usage="diffmon [-D] [-t INTERVAL] CMD ARGS... | |
-t INTERVAL Interval to sleep between command executions | |
-b Print a blank line between changes instead of the date" | |
interval=1 | |
show_date=yes | |
while getopts "hbt:" o; do | |
case "$o" in |
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
keycode 232 = XF86MonBrightnessDown | |
keycode 233 = XF86MonBrightnessUp | |
keycode 121 = XF86AudioMute | |
keycode 122 = XF86AudioRaiseVolume | |
keycode 123 = XF86AudioLowerVolume | |
keycode 173 = XF86AudioPrev | |
keycode 172 = XF86AudioPlay | |
keycode 171 = XF86AudioNext |
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 | |
# Guess Tags From Filename, using python and mutagen. | |
import mutagen | |
from mutagen.easyid3 import EasyID3 | |
import re | |
import os.path | |
import sys |
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 ruby | |
require 'text/format' | |
class Entry | |
attr_accessor :flighting, :body | |
def initialize | |
@body = [] | |
end |
OlderNewer