This file contains 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
var oauthPercentEncode = (function(){ | |
var escapeChars = "!*'();:@&=+$,/?%#[]", | |
matchChars = new RegExp( "([\\" + ( escapeChars.split('').join('\\')) + "])", "gi"); | |
return function( p ) { | |
return p.replace( matchChars, function( char ) { | |
return '%' + ( "" + char ).charCodeAt(0).toString(16).toUpperCase(); | |
}) | |
} |
This file contains 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/python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
__all__ = ["transform"] | |
__version__ = '0.3' | |
__author__ = 'Christoph Burgmer <cburgmer@ira.uka.de>' | |
__url__ = 'http://github.com/cburgmer/upsidedown' |
This file contains 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
GOOGLE_CLIENT_ID = '828226820573-...' | |
GOOGLE_CLIENT_SECRET = 'GjVcxp...' | |
GOOGLE_OAUTH_URL = 'https://accounts.google.com/o/oauth2/auth?scope=https%%3A%%2F%%2Fwww.googleapis.com%%2Fauth%%2Fuserinfo.email+https%%3A%%2F%%2Fwww.googleapis.com%%2Fauth%%2Fuserinfo.profile&state=&redirect_uri=%s&response_type=code&client_id=%s' # add gmail scopes...? | |
GOOGLE_TOKEN_URL = 'https://accounts.google.com/o/oauth2/token' | |
GOOGLE_REDIRECT_URL = 'http://%s/auth/google/callback' % HOST | |
... | |
urlpatterns = patterns(..., |
This file contains 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
authmodulelist="authuserdb authpam" | |
daemons=5 | |
authdaemonvar=/var/spool/authdaemon/socket | |
DEBUG_LOGIN=0 | |
DEFAULTOPTIONS="" |
This file contains 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 pyltfs2 | |
import sys | |
url='mysql+mysqlconnector://root:123@localhost/syslink_tapelibrary' | |
ltfs = pyltfs2.LTFS(url) | |
ltfs.delete_tape(name=sys.argv(1)) |
This file contains 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 reconfigure.items.bound import BoundData | |
from reconfigure.configs.base import Reconfig | |
from reconfigure.parsers import IniFileParser | |
from reconfigure.builders import BoundBuilder | |
class OperaData (BoundData): | |
pass | |
This file contains 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 ajenti.api import * | |
from ajenti.plugins.main.api import SectionPlugin | |
from ajenti.ui import on | |
from ajenti.ui.binder import Binder | |
@plugin | |
class GLSlideShowPrefs (SectionPlugin): | |
default_classconfig = { | |
'option_1_enable': True # etc |
This file contains 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
➜ glslideshow_flags ls -l | |
total 12 | |
lrwxrwxrwx 1 eugene eugene 49 Feb 18 11:20 glslideshow_flags.py -> /usr/share/pyshared/ajenti/plugins/hosts/hosts.py | |
-rw-r--r-- 1 eugene eugene 1967 Feb 18 11:28 glslideshow_flags.pyc | |
lrwxrwxrwx 1 eugene eugene 52 Feb 18 11:20 __init__.py -> /usr/share/pyshared/ajenti/plugins/hosts/__init__.py | |
-rw-r--r-- 1 eugene eugene 570 Feb 18 11:28 __init__.pyc | |
drwxr-xr-x 2 eugene eugene 4096 Feb 18 11:20 layout |
This file contains 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 Option (object): | |
def __init__(self, value): | |
self.value = value | |
...in plugin: | |
def init(self): | |
.... | |
self.binder = Binder(None, self) |
This file contains 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 ajenti.ui import UIElement | |
print UIElement.get_classes() | |
print sorted(list(set([x.typeid for x in UIElement.get_classes()]))) |