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 sys | |
import itertools | |
import csv | |
def grouper(n, iterable, fillvalue=None): | |
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" | |
args = [iter(iterable)] * n | |
return itertools.izip_longest(fillvalue=fillvalue, *args) | |
def chainfix(lines): |
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
:: Copy this file to the root of the flash memory and then run it | |
md autorun.inf | |
cd autorun.inf | |
md -..\ | |
:: Now, to delete the folder autorun.inf format the flash memory |
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 sys | |
import os | |
from datetime import datetime | |
from PIL import Image | |
# Keys of items that may contain date | |
items = [36868, 36867, 306] | |
# Output date format |
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 sys | |
import os | |
import glob | |
import subprocess | |
import tempfile | |
EDITOR = 'c:/Program Files/Sublime Text 2/sublime_text.exe' | |
files = sys.argv[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
import json | |
import ConfigParser | |
class JSONConfig(ConfigParser.RawConfigParser): | |
def write(self, fp): | |
output = self._dict() | |
if self._defaults: | |
for (key, value) in self._defaults.items(): | |
output[key] = value | |
for section in self._sections: |
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
┌────────────────────────────┤ Byobu Help ├─────────────────────────────┐ | |
│ │ | |
│ Byobu is a suite of enhancements to tmux, as a command line │ | |
│ tool providing live system status, dynamic window management, │ | |
│ and some convenient keybindings: │ | |
│ │ | |
│ F1 * Used by X11 * │ | |
│ Shift-F1 Display this help │ | |
│ F2 Create a new window │ | |
│ Shift-F2 Create a horizontal split │ |
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
youtube-dl -a - -i -o ' out=%(uploader)s/%(id)s %(title)s.%(ext)s' -g --get-filename --cookies .cookies \ | |
< all-bookmarks.txt \ | |
^ youtube-dl.log \ | |
| aria2c -c -j 6 -x 6 -s 6 -k 1M --load-cookies=.cookies -i - --deferred-input=true \ | |
^ aria2c.log |
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
MouseIsOver(WinTitle) { | |
MouseGetPos,,, Win | |
return WinExist(WinTitle . " ahk_id " . Win) | |
} | |
#If WinActive("Guitar Pro 5") and MouseIsOver("Guitar Pro 5") | |
RButton:: | |
Send {LButton} | |
Send {Del} | |
Return |
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
from Tkinter import Tk | |
r = Tk() | |
r.withdraw() | |
print r.clipboard_get() | |
r.destroy() |
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 python2 | |
import glob | |
from itertools import takewhile | |
import os | |
import subprocess | |
import sys | |
import tempfile | |
EDITOR = 'c:\\Program Files\\Sublime Text 3\\sublime_text.exe' |