Skip to content

Instantly share code, notes, and snippets.

View vain's full-sized avatar

vain

View GitHub Profile
@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
@vain
vain / .Xresources
Created April 9, 2012 08:22
XTerm colors
! Farben, based on Thayer:
! http://cinderwick.ca/files/configs/Xdefaults
XTerm*background: #0e0e0e
XTerm*foreground: #aaaaaa
XTerm*cursorColor: #ffffff
! Black
XTerm*color0: #000000
XTerm*color8: #555753
! Red
XTerm*color1: #ff6565
@vain
vain / gist:2342271
Created April 9, 2012 08:18
Ugly perl colored ls (no separators)
#!/usr/bin/perl -w
use strict;
my $cols = int(`tput cols`);
my $COL_BOLD = "\e[1m";
my $COL_RESET = "\e[0m";
my $COL_BLACK = "\e[30m";
my $COL_RED = "\e[31m";
my $COL_GREEN = "\e[32m";
@vain
vain / gist:2342267
Created April 9, 2012 08:16
inkpot2_orig_simplified
" Vim color file
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "inkpot2_orig_simplified"
@vain
vain / coloredls.pl
Created September 3, 2011 12:58
Colored ls with separators.
#!/usr/bin/perl -w
use strict;
# Dear world,
#
# this is what your code will look like when you're too tired to
# actually write code. So, remember, kids: Sleep early, sleep often. :-)
#
# Happy hacking.
@vain
vain / gist:1073680
Created July 9, 2011 15:45
Simple adblock for luakit
--------------------
-- Simple adblock --
--------------------
-- Basically a simplified version of:
-- https://github.com/quigybo/luakit/blob/d19c3014d0bc5603bf5f6eae5cf689a95d3eb97d/lib/adblock.lua
local table = table
local ipairs = ipairs
local string = string