This file contains hidden or 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" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
def rag | |
rag = -1 | |
res = @connection.send(@key[:name]).send(@key[:function].to_sym) | |
thresholds = @key[:rag].reverse | |
thresholds.each_index do |idx| | |
val = thresholds[idx] | |
rag = idx if res.send(@key[:operator].to_sym, val) | |
end |
This file contains hidden or 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
:vb_active_num: | |
:namespace: Wizcorp::Couchbase | |
:class: BucketStats | |
:function: :avg # :avg, :sum, :none | |
:operator: :< | |
:rag: [1024,1024,1025] |
OlderNewer