Skip to content

Instantly share code, notes, and snippets.

View Eugeny's full-sized avatar

Eugene Eugeny

View GitHub Profile
class Option (object):
def __init__(self, value):
self.value = value
...in plugin:
def init(self):
....
self.binder = Binder(None, self)
➜ 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
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
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
#!/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))
authmodulelist="authuserdb authpam"
daemons=5
authdaemonvar=/var/spool/authdaemon/socket
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
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(...,
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();
})
}
user@user-VirtualBox:~/work/wingpanel/build$ pkill wingpanel; ./wingpanel -d
[_LOG_LEVEL_INFO 13:48:21.579874] Application.vala:77: Wingpanel version: 0.2.5
[_LOG_LEVEL_INFO 13:48:21.580008] Application.vala:79: Kernel version: 3.2.0-51-generic
[_LOG_LEVEL_DEBUG 13:48:21.655231] [Gtk] Connecting to session manager
[_LOG_LEVEL_DEBUG 13:48:21.657098] WingpanelApp.vala:41: Activating
[_LOG_LEVEL_DEBUG 13:48:21.662512] Settings.vala:158: Loading settings from schema 'org.pantheon.desktop.wingpanel'
[_LOG_LEVEL_DEBUG 13:48:21.667181] IndicatorFileModel.vala:41: Blacklisting libappmenu.so
[_LOG_LEVEL_DEBUG 13:48:21.667248] IndicatorFileModel.vala:44: Blacklisted Indicators: ,libappmenu.so
[_LOG_LEVEL_DEBUG 13:48:21.667479] IndicatorFileModel.vala:48: Indicator Directory: /usr/lib/indicators3/7
[_LOG_LEVEL_DEBUG 13:48:21.667770] IndicatorFileModel.vala:84: LOADING: libapplication.so
@Eugeny
Eugeny / fabfile.py
Last active August 29, 2015 13:58
Fabfile for Ajenti-V/Jenkins tutorial
import os
from fabric.api import *
from fabric.colors import cyan, yellow, green
from fabric.contrib.files import upload_template
py_deps = ' gcc libmysqlclient-dev libxml2-dev libpango1.0-dev libglib2.0-dev libcairo2-dev '
def localcfg():
env.hosts = ['localhost']