Skip to content

Instantly share code, notes, and snippets.

@cjbarnes18
cjbarnes18 / .xinitrc
Last active August 29, 2015 13:57
gpg agent persistance
#!/bin/sh
# ...
export SSH_ASKPASS=ssh-askpass
SSH_ENV=$HOME/.ssh/environment
AGENT=gpg-agent
OPTS="--enable-ssh-support --daemon"
RUN="$AGENT $OPTS"
function start_agent {
echo "Initialising new agent..."
@cjbarnes18
cjbarnes18 / libqtile.diff
Created November 29, 2013 03:28
2to3 libqtile
--- libqtile/bar.py (original)
+++ libqtile/bar.py (refactored)
@@ -18,12 +18,12 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-import command
-import confreader
-import drawer
-import hook
@cjbarnes18
cjbarnes18 / salt-minion
Last active December 23, 2015 07:29
salt minion error on debian arm
salt-minion -l all
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[INFO ] Found minion id from getfqdn(): freedombox
[INFO ] Configuration file path: /etc/salt/minion
[INFO ] Setting up the Salt Minion "freedombox"
[DEBUG ] Created pidfile: /var/run/salt-minion.pid
[DEBUG ] Chowned pidfile: /var/run/salt-minion.pid to user: root
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] loading grain in ['/var/cache/salt/minion/extmods/grains', '/usr/lib/python2.7/dist-packages/salt/grains']
@cjbarnes18
cjbarnes18 / config.py
Last active August 30, 2021 15:37
Qtile config.py
# -*- coding: utf-8 -*-
from subprocess import check_output, call
from libqtile.config import Key, Screen, Group, Drag, Click, Match
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook, notify
#From libqtile.widget.crashme import _CrashMe
follow_mouse_focus = False
@cjbarnes18
cjbarnes18 / .bash_profile or your equivalent
Created November 15, 2012 13:38
Settings for Java in Qtile
export _JAVA_AWT_WM_NONREPARENTING=1
export AWT_TOOLKIT=MToolkit
@cjbarnes18
cjbarnes18 / gist:4056413
Created November 11, 2012 22:02
Qtile release
It gives me great pleasure to announce the release of Qtile 0.5.
This release includes
- New website
- Migration of the test suite to nose
- Documentation is now written in sphinx
- 2 new layouts
- Many new widgets
Please see the change log for more details.
create file /etc/apt/sources.list.d/tycho.list with the following.
deb http://ppa.launchpad.net/tycho-s/ppa/ubuntu precise main
deb-src http://ppa.launchpad.net/tycho-s/ppa/ubuntu precise main
curl "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x8516D5EEF453E809" > tyco.key
apt-key add tyco.key
aptitude update
aptitude install qtile
To get up and running copy the default config.
mkdir -p ~/.config/qtile
@cjbarnes18
cjbarnes18 / core.css
Created March 27, 2012 21:50
HTML sample template
html {
background-color: lightblue;
padding: 0;
margin: 0;
height: 100%;
}
body {
padding: 0;
height: 100%;
background-color: white;
@cjbarnes18
cjbarnes18 / config.py
Created March 27, 2012 21:24
Help key
def get_help(q):
import webbrowser
webbrowser.register('firefox-auror', webbrowser.Mozilla)
webbrowser.open('www.qtile.org')
keys = [
Key([alt], 'F1', lazy.function(get_help)),
]
@cjbarnes18
cjbarnes18 / url.py
Created March 21, 2012 21:17
open a url remotely using Pyramid
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
import webbrowser
def open_url(request):
if request.POST:
webbrowser.open(request.POST['url'])
form = '''