Skip to content

Instantly share code, notes, and snippets.

$ ag '(ctrl|caps):' /usr/share/X11/xkb/rules/base.lst
755: ctrl:nocaps Caps Lock as Ctrl
756: ctrl:lctrl_meta Left Ctrl as Meta
757: ctrl:swapcaps Swap Ctrl and Caps Lock
758: ctrl:ac_ctrl At left of 'A'
759: ctrl:aa_ctrl At bottom left
760: ctrl:rctrl_ralt Right Ctrl as Right Alt
761: ctrl:menu_rctrl Menu as Right Ctrl
762: ctrl:ctrl_ralt Right Alt as Right Ctrl
763: ctrl:swap_lalt_lctl Swap Left Alt key with Left Ctrl key
@Caustic
Caustic / playbook.yml
Last active December 26, 2015 18:09 — forked from anonymous/playbook.yml
---
- hosts: localhost
sudo: True
tasks:
- apt: pkg={{ item }} state=latest update_cache=yes
with_items:
- binutils
- build-essential
- curl
- htop
@Caustic
Caustic / fqdn.py
Created August 27, 2013 20:35
vagrant bugreport
def getfqdn(name=''):
"""Get fully qualified domain name from name.
An empty argument is interpreted as meaning the local host.
First the hostname returned by gethostbyaddr() is checked, then
possibly existing aliases. In case no FQDN is available, hostname
from gethostname() is returned.
"""
name = name.strip()
@Caustic
Caustic / minion
Created August 26, 2013 22:43
The files to recreate issue.
file_client: local
file_roots:
base:
- /srv/salt/states
@Caustic
Caustic / file.inquestion
Created August 26, 2013 22:36
Salt bug report
ubuntu@precise:~$ ls -la virtualenv/bin/
total 6720
drwxr-xr-x 2 ubuntu ubuntu 4096 Aug 26 15:18 .
drwxr-xr-x 5 ubuntu ubuntu 4096 Aug 26 15:18 ..
-rw-r--r-- 1 ubuntu ubuntu 2132 Aug 26 15:18 activate
-rw-r--r-- 1 ubuntu ubuntu 1045 Aug 26 15:18 activate.csh
-rw-r--r-- 1 ubuntu ubuntu 2864 Aug 26 15:18 activate.fish
-rw-r--r-- 1 ubuntu ubuntu 1129 Aug 26 15:18 activate_this.py
-rwxr-xr-x 1 root root 144 Aug 26 15:18 django-admin.py
-rwxr-xr-x 1 ubuntu ubuntu 343 Aug 26 15:18 easy_install
@Caustic
Caustic / quine.py
Created July 16, 2013 02:02
Python Quine
_='_=%r;print _%%_';print _%_
@Caustic
Caustic / gist:5997170
Created July 15, 2013 02:43
Fun with python.
#!/usr/bin/env python
import sys
from subprocess import call
def main():
args = sys.argv
return call(args)
if __name__ == '__main__':
/*
* This file is part of the libopencm3 project.
*
* Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
##
## This file is part of the libopencm3 project.
##
## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
##
## This library is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
@Caustic
Caustic / gist:4743630
Created February 9, 2013 02:52
ls autocomplete colors
$ dircolors >> ~/.zshrc
$ echo "zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}" >> ~/.zshrc