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
/* 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
[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
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
#!/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
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
ZSH_CUSTOM=$HOME/.oh-my-zsh-custom | |
ZSH_THEME="" | |
plugins=(bundle brew gem git git-flow debian django pip python rails rake svn terminator wakeonlan) | |
vd() { wget --no-check-certificate -c http://files.malik.pro/$1 } | |
avd() { aria2c -c http://files.malik.pro/$1 } | |
gt() { grep --color=always -n -Rs $1 . } | |
gtf() { grep -Rl $1 . } |
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 -*- | |
import urllib | |
import sys | |
import os | |
import unicodecsv as csv | |
import glob | |
import datetime |
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 -*- | |
import urllib | |
import sys | |
import os | |
import re | |
import unicodecsv as csv | |
from BeautifulSoup import BeautifulSoup |
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
1234567;0700;Pobudka; | |
1234567;0730;Kawa, fajka, eztv; | |
1234567;0800;Zakupy, Śniadanie; | |
1234567;0900;Robota; | |
1234567;1300;Obiad serial; | |
1234567;1400;Robota; | |
1234567;1800;Telefon; | |
1234567;1900;Kawa, seriale; | |
1234567;1945;Plan na Jutro; | |
1234567;2000;Robota, zalążek roboty na jutro; |