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
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
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
#!/bin/bash | |
:<<"=cut" | |
=head1 NAME | |
C<run_root_remotely> - use expect and sudo to deploy SSH key to remote | |
server root account and execute script on the remote via SSH as root | |
=head1 DESCRIPTION |
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
/* 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 | |
# ssh-multi | |
# D.Kovalov | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
# a script to ssh multiple servers over multiple tmux panes | |
starttmux() { | |
if [ -z "$HOSTS" ]; then |
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
tmux_pwd () { | |
[ -z "${TMUX}" ] && return | |
TARGET=\-t$(tmux display-message -p "#S") | |
tmux set-window-option ${TARGET} default-path $PWD > /dev/null | |
(( sleep 300; | |
tmux set-window-option ${TARGET} default-path ~/Development > /dev/null; ) & ) > /dev/null 2>&1 | |
} | |
alias pwd="\pwd; tmux_pwd" |
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~]$ " "" |
OlderNewer