This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' enable git | |
precmd() { | |
vcs_info | |
} | |
setopt prompt_subst | |
zstyle ':vcs_info:git:*' check-for-changes true | |
zstyle ':vcs_info:*' formats "%f[%%n@%%m %1~] $ " "%f%a %F{3}%m%u%c %f%b:%r/%S" | |
zstyle ':vcs_info:*' nvcsformats "%f[%n@%m %1~]$ " "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def play songs | |
song = songs[rand songs.length].strip | |
puts song | |
song.gsub!('`','\\\\`') | |
$pid = Process.spawn "afplay -v .2 \"#{song}\"" | |
Process.wait $pid | |
sleep 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Page */ | |
body {} | |
/* Header */ | |
div#quickbar {} | |
body.aileron #main-navigation #app-nav > li, body.aileron #main-navigation #app-nav > li > a, #prefs-menu > li, #prefs-menu > li > a, #logo .rtname {} | |
/* Page title */ | |
div#header h1 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# D.Kovalov, 2008 | |
# Non-debian patched vpns dos not support Target Nets config option. | |
# This script would emulate it: resets default routing after vpnc starts | |
# and sets DNS after startr/stop of VPNC | |
# | |
# User setting: | |
# What nets are routced through vpnc tun deviceand what's gateway for it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MEDIUM_SUPPORTED = cdrom cdrom-xen netboot netboot-gtk netboot-xen hd-media | |
MEDIUM_SUPPORTED_EXTRA = monolithic | |
# The version of the kernel to use. | |
KERNELVERSION = 2.6.32-5-amd64 | |
KERNELMAJOR = 2.6 | |
KERNEL_FLAVOUR = di | |
KERNELNAME = vmlinuz | |
KERNELIMAGEVERSION = $(KERNELVERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1="\u@\h:\W $ " | |
short_path () { | |
local max_len=20 | |
path=$(pwd) | |
len=$(echo $path | wc -c) | |
if test $len -lt $max_len; then | |
echo $path | |
else | |
st=$(echo $path | cut -c-8) | |
echo "${st}.../$(basename $path)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Object | |
require 'pp' | |
# Simple debugging method for ruby. It takes an object, prints it with time | |
# stamp and caller insformation, returns an object. So it can be instesreted | |
# into any chain or method calls. | |
# | |
# Program debug level can be set by either global variable $debug or | |
# environment setting ENV['DEBUG'] | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# If you have munch of MP3's in a folder with filenames corresponding | |
# to the titles of songs, but ID3 tags are missing or misformed (for | |
# example, coming from Windows with cp1251 codapage, but you need | |
# UTF8), this script will read filenames and set ID3 tags | |
# correspondingly. | |
# | |
# cd to the directory with mp3 files and execute script | |
# there. Directories on the upper level should have names: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
doit () { | |
NAME="$*" | |
echo $NAME | |
NAME=$(echo $NAME | sed 's;^\.\/;;') | |
DIR=$(dirname "$NAME") | |
FILE="$(echo $(basename ${NAME}) | sed 's/\.[^\.]*$//')" | |
OUT=tmp/$DIR | |
OFILE="${OUT}/${FILE}.mp3" |
NewerOlder