Skip to content

Instantly share code, notes, and snippets.

View vain's full-sized avatar

vain

View GitHub Profile
@vain
vain / PKGBUILD
Created July 27, 2015 15:23
uw-ttyp0-font with custom VARIANTS.dat
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
_dotted_zero=false
_centered_tilde=true
_encodings='uni i15'
pkgname='uw-ttyp0-font'
pkgdesc='Bitmap monospaced font with unicode support and Powerline symbols'
pkgver='1.3'
pkgrel='1'
@vain
vain / dummy-content
Last active August 29, 2015 14:12
Quick and dirty teamvault development environment on Arch Linux using overqemu
for i in {1..250}; do curl -X POST -H 'Content-Type: application/json' --user bob:bob --data-binary '{"allowed_groups": [], "allowed_users": ["bob"], "name": "apitest '"$i"'", "password": "huch '"$i"'"}' 'http://10.33.20.2/api/secrets/'; done
diff --git a/src/bundlewrap/utils/remote.py b/src/bundlewrap/utils/remote.py
index 3fa606e..d36b7de 100644
--- a/src/bundlewrap/utils/remote.py
+++ b/src/bundlewrap/utils/remote.py
@@ -13,7 +13,8 @@ def _parse_file_output(file_output):
return ('nonexistent', "")
elif file_output in ("directory", "sticky directory"):
return ('directory', file_output)
- elif file_output in ("block special", "character special"):
+ elif file_output.startswith("block special ") or \
@vain
vain / clock.py
Created May 29, 2014 19:22
POC timing with artificial delay
#!/usr/bin/env python3.4
import datetime
import time
def something():
print(datetime.datetime.now())
# Simulate long running task
time.sleep(0.75)
@vain
vain / vnc.sh
Created May 2, 2014 17:37
vnc-box
#!/bin/bash
#launch_screen()
#{
# # Xvfb + x11vnc
#
# (
# screen=$1
#
# Xvfb :$screen -screen 0 1024x768x24 &
@vain
vain / PKGBUILD
Created October 18, 2013 15:55
mu package for xapian-1.3
# Maintainer: megadriver <megadriver at gmx dot com>
# Contributor: Tom Willemsen <tom at ryuslash dot org>
# Contributor: Uwe <moc liamg skcuneelu <-- look what I did there>
# Contributor: Nicolas Pouillard <nicolas dot pouillard at gmail dot com>
pkgname=mu
pkgver=0.9.9.5
pkgrel=4
pkgdesc="A collection of utilities for indexing and searching Maildirs"
arch=('i686' 'x86_64')
@vain
vain / PKGBUILD
Created May 26, 2013 08:09
Revised PKGBUILD for urlview
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
pkgname=urlview
pkgver=0.9
pkgrel=7
_patchlevel=18.1
pkgdesc="A curses URL parser for text files"
arch=('i686' 'x86_64')
url="http://packages.qa.debian.org/u/urlview.html"
license=('GPL')
@vain
vain / gist:3105778
Created July 13, 2012 16:23
watch-and-notify
#!/bin/bash
# Requires inofity-tools.
# Get filename to watch.
if [[ -z "$1" ]]
then
cat << EOM
Usage: $(basename $0) <filename> [-c <context>] [args to 'notify-send' ...]
EOM
#!/bin/bash
# Index based array -- both "hello" and "bar" evaluate to 0:
indarr["hello"]="world!"
indarr["bar"]="baz"
echo "Contents of indarr:"
for k in "${!indarr[@]}"
do
@vain
vain / gist:2342295
Created April 9, 2012 08:29
Usage of colored ls in an XTerm
wrapoff()
{
# Wraparound aus, damit lange Zeilen nicht umgebrochen werden.
# Das ist eine XTerm-Einstellung, mache das also nur, wenn stdout
# ein solches ist und auch wirklich ein Terminal ist, also nicht
# gerade umgeleitet wird.
[[ -t 1 ]] || return
case "$TERM" in