Skip to content

Instantly share code, notes, and snippets.

View dir01's full-sized avatar

Andrew Zhukovskiy dir01

  • Tel Aviv, Israel
View GitHub Profile
@dir01
dir01 / gist:2187561
Created March 24, 2012 20:37
Find stuff in torrents folder not added to torrent client
ls -1 /data/torrents/ | while read NAME; do grep -qrF "$NAME" /var/transmission/config/torrents/ || echo $NAME; done
@dir01
dir01 / gist:2133462
Created March 20, 2012 09:39
Add previews to textareas
(function($) {
$.fn.previewTextareas = function() {
var $el = this;
var run = function(){
var textareas = $('textarea', $el);
textareas.each(initializeTextarea);
};
class StepsProcessor(object):
def __init__(self, steps, filename):
self.steps = steps
self.filename = filename
def process(self):
for i, step in self.enumerate_steps_to_process():
try:
self.process_step(step)
except Exception: