Skip to content

Instantly share code, notes, and snippets.

View ThomasJunk's full-sized avatar

Thomas Junk ThomasJunk

  • Intevation
  • Osnabrück (GER)
View GitHub Profile
@ThomasJunk
ThomasJunk / Sequencing
Created April 26, 2015 15:07
Javascript
slice=Function.prototype.call.bind([].slice);
sequence=function(){
args=slice(arguments);
return function(value){
return args.reduce(function(f,g){
return g.call(this, f);
}, value)
}
}
@ThomasJunk
ThomasJunk / .vimrc
Last active May 18, 2016 19:43
.vimrc
set encoding=utf-8
set nocompatible " be iMproved, required
set number
set laststatus=2
set noswapfile
set autowriteall
set hidden
set showcmd
set rtp+=~/.vim/bundle/Vundle.vim
set expandtab
@ThomasJunk
ThomasJunk / config
Last active September 9, 2015 17:45
.i3
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@ThomasJunk
ThomasJunk / example.xml
Last active September 11, 2015 04:58
Formbar example
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<configuration>
<source>
<entity id="e1" name="firstName" label="Vorname" type="string">
<help>Hilfe f&#195;&#188;r die Eingabe</help>
</entity>
<entity id="e2" name="lastName" label="Nachname" type="string" />
<entity id="e3" name="birthDay" label="Geburtstag" type="date" />
<entity id="e4" name="gender" label="Geschlecht" type="bool">
<renderer type="radio" />
@ThomasJunk
ThomasJunk / .muttrc
Last active May 12, 2016 19:27
.muttrc
set realname = 'thomas junk'
unset imap_passive
set move = no
set imap_keepalive = 900
set header_cache = ~/.mutt/cache/heders
set message_cachedir = ~/.mutt/cache/bodies
set certificate_file = ~/.mutt/certificates
set sort = reverse-date-received
set editor=vim
set pgp_sign_as = 545CEAE2
while true; do
load=$(cat /proc/loadavg | awk '{print $1}')
mem=$(free -h | sed -n '2{p;q}' | awk '{print $4}')
keyboard=$(setxkbmap -query | grep layout | awk '{print $2}')
ip=$(ip addr show | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
ip6=$(ip addr show | grep -P 'inet6 \w+:\w+'| awk '{print $2 }')
echo " $load%  $mem  $ip  $keyboard $( date +"%A, %d.%B %Y") $( date +"%T" )"
sleep 1s # Update time every minute
done
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char *fonts[] = {
"Cousine:size=8"
};
static const char dmenufont[] = "Cousine:size=8";
static const char normbordercolor[] = "#444444";
static const char normbgcolor[] = "#222222";
static const char normfgcolor[] = "#bbbbbb";
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
#if 0
static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false";
#endif
set -g default-terminal "screen-256color"
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/tmux-powerline/powerline.sh right)"
bind C-[ run '~/path/to/tmux-powerline/mute_powerline.sh left' # Mute left statusbar.
bind C-] run '~/path/to/tmux-powerline/mute_powerline.sh right' # Mute right statusbar.
--python-kinds=cfm
--javascript-kinds=cm
--fields=-s
--fields=+l
--fields=+n
--exclude=flowplayer
--exclude=.hg
--exclude=.git