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 gi | |
| gi.require_version('Gtk', '3.0') | |
| from gi.repository import Gtk | |
| import gbulb | |
| import rx | |
| import json | |
| from rx.subjects import Subject | |
| from rx.concurrency import AsyncIOScheduler | |
| from tornado.httpclient import AsyncHTTPClient | |
| from tornado.httputil import url_concat |
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
| style "vimfix" { | |
| bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color. | |
| } | |
| widget "vim-main-window.*GtkForm" style "vimfix" |
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
| def _run_as_pg(command): | |
| return sudo('sudo -u postgres %s' % command) | |
| def pg_user_exists(username): | |
| with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True): | |
| res = _run_as_pg('''psql -t -A -c "SELECT COUNT(*) FROM pg_user WHERE usename = '%(username)s';"''' % locals()) | |
| return (res == "1") | |
| def pg_database_exists(database): | |
| with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True): |
NewerOlder