Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sandrop
sandrop / torrent-file-size.py
Created February 21, 2021 16:30 — forked from DonnchaC/torrent-file-size.py
Get total file sizes of contents for a set of .torrent files
import os
import sys
import bencodepy
import humanize
import argparse
def total_size_files_torrent(file_name):
try:
parsed = bencodepy.decode_from_file(file_name)
@sandrop
sandrop / import_cards.js
Created April 10, 2012 01:09
Trello: Add multiple cards bookmarklet (disregarding archived lists)
(function () {
var body = document.getElementsByTagName("body")[0];
var bg = document.createElement("div");
bg.setAttribute("style", "position: absolute; z-index: 1000; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.5)");
var form = document.createElement("div");
form.setAttribute("style", "margin: 0 auto; height: 100%; width: 800px; padding: 50px; background: rgb(200, 200, 220);");
form.appendChild(document.createTextNode("Board: "));
var list_select = document.createElement("select");
var lists = boardView.model.listList.models;
@sandrop
sandrop / Google-Analytics-Roll-Up.js
Created August 5, 2011 22:30
Google Analytics Roll Up
// edit usual tracking snippet
var _gaq = _gaq || [];
_gaq.push(
['_setAccount', 'UA-xxxxxxx-1'],
['_trackPageview'],
['rollup._setAccount', 'UA-yyyyyyyy-1'],
['rollup._trackPageview']
);