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
#!/bin/bash | |
# This hook is run after this virtualenv is activated. | |
source ~/.rvm/scripts/rvm | |
rvm use 1.9.3 | |
gemsets=`rvm gemset list` | |
proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}') | |
if [[ ! $gemsets == *"$proj_name" ]]; then | |
rvm gemset create $proj_name |
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
from functools import wraps | |
import traceback | |
import sys | |
registry = {} | |
def autodiscover(submodule_name=None, variables=None, callback=None): | |
""" | |
Auto-discover INSTALLED_APPS {submodule_name}.py modules and fail silently when | |
not present. |
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
/*global angular:true, browser:true */ | |
/** | |
* @license HTTP Auth Interceptor Module for AngularJS | |
* (c) 2012 Witold Szczerba | |
* License: MIT | |
*/ | |
(function () { | |
'use strict'; |
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
class ListAsMember(list): | |
def __getattr__(self, index): | |
if index.startswith("_"): | |
index = index.replace("_", "") | |
if not isinstance(index, int): | |
index = int(index) | |
value = self[index] |
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
HERE_DIR = os.path.abspath(os.path.dirname(__file__)) | |
CONFIGPATH = os.path.abspath("../fabric.yaml") | |
import yaml | |
class ListAsMember(list): | |
def __getattr__(self, index): | |
if index.startswith("_"): | |
index = index.replace("_", "") |
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 | |
""" | |
Chuck this in : ~/bin/wineprefix | |
$ chmod +x ~/bin/wineprefix | |
$ wineprefix list | |
# makes a list of directories at ~/.local/share/wineprefixes | |
borderlands2 | |
masseffect3 | |
fonv |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<addon id="MyWebinterface" | |
version="0.0.1" | |
name="Hello World Webinterface" | |
provider-name="MyName"> | |
<requires> | |
<import addon="xbmc.gui" version="4.0.0"/> | |
<import addon="xbmc.json" version="6.0.0"/> | |
</requires> | |
<extension point="xbmc.gui.webinterface"/> |
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
""" | |
License | |
======= | |
Do whatever you like. | |
Usage | |
===== | |
1. put it in your project |
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
from hashlib import md5, sha1 | |
from base64 import urlsafe_b64encode as b64encode | |
import random, string | |
random.seed() | |
pattern = "%%0%dX" | |
junk_len = 1024 | |
def generate_key(max_length, seed_length, encoder=b64encode, digester=sha1): |
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 | |
# chmod +x /opt/sickbeard/postprocess.d/call-periscope | |
# /opt/sickbeard/postprocess.d/call-periscope | |
import os, sys | |
import contextlib | |
import logging | |
import logging.handlers | |