This file contains hidden or 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
remote_ftp_list(){ | |
lftp -e 'find /;bye' $1 >$1._filelist | |
} |
This file contains hidden or 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 | |
import time, calendar, re | |
def display_cals(): | |
localtime = time.localtime(time.time()) | |
weeks = cal(localtime[0], localtime[1], localtime[2], 10) | |
cal(localtime[0], localtime[1]+1, 0, 190, int('-%s' % (16*weeks))) | |
def cal(year, month, day=0, offset=0, voffset=0): | |
calendar.setfirstweekday(calendar.SUNDAY) |
This file contains hidden or 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
feedLoaded = (result) -> | |
unless result.error | |
container = document.getElementById("rssnews") | |
if container | |
container.innerHTML = "" | |
i = 0 | |
ul = document.createElement("ul") | |
ul.setAttribute "class", "posts" | |
while i < result.feed.entries.length |
This file contains hidden or 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
[color] | |
ui = true | |
[alias] | |
lg = !"git lg1" | |
st = status | |
lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit | |
ci = commit | |
co = checkout | |
df = diff |
This file contains hidden or 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
/* Set the defaults for DataTables initialisation */ | |
jQuery.extend(true, jQuery.fn.dataTable.defaults, { | |
"sDom": "<'row'<'col-sm-12'<'pull-right'f><'pull-left'l>r<'clearfix'>>>t<'row'<'col-sm-12'<'pull-left'i><'pull-right'p><'clearfix'>>>", | |
"sPaginationType": "bs_normal", | |
"oLanguage": { | |
"sLengthMenu": "_MENU_ records per page", | |
"sSearch": "Search" | |
}, | |
"fnPreDrawCallback": function(oSettings, json) { | |
$('.dataTables_filter input').addClass('form-control input-sm'); |
This file contains hidden or 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 recurly as recurly_api | |
from django.core.cache import cache | |
from django.conf import settings | |
from hashlib import sha512 | |
def string_to_key(string): | |
return sha512(string).hexdigest()[:250] # max size of caching keys in memcached | |
def function_cache(timeout=300, override_key=None): |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
""" | |
TraktTvPy | |
Usage: | |
TraktTv.py search <term> [--add] [options] | |
TraktTv.py watchlist [--delete] [--watch] [--unwatch] [options] | |
TraktTv.py -h | --help |
This file contains hidden or 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
[ | |
"2014-05-13T11:07:38.383364", | |
{ | |
"custom": [ | |
{ | |
"accounting_code": "custom", | |
"description": "Customer or a specially quoted offer. Pricing & payment terms always set per customer. This is for *existing* customer when starting to offer new priceplan", | |
"monthly_unit_amounts_in_cents": { | |
"EUR": 100050, | |
"SEK": 1000000, |
This file contains hidden or 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
[ | |
"2014-04-06T16:46:15.119769", | |
{ | |
"custom": [ | |
{ | |
"accounting_code": "custom", | |
"description": "Customer or a specially quoted offer. Pricing & payment terms always set per customer. This is for *existing* customer when starting to offer new priceplan", | |
"name": "Custom", | |
"plan__interval_unit": "months", | |
"plan_code": "custom", |
This file contains hidden or 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
# coding: utf-8 | |
import os | |
import subprocess | |
import urllib | |
theme_names = ['3024-dark', | |
'3024-light', | |
'atelierdune-dark', | |
'atelierdune-light', |