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
require 'logger' | |
require 'rbcurse' | |
require 'rbcurse/core/widgets/rmessagebox' | |
if $0 == __FILE__ | |
# Initialize curses | |
# some helper methods for working with stdlib FILE pointers | |
module CLib | |
extend FFI::Library | |
ffi_lib FFI::Library::LIBC |
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 zsh | |
for file ( *.flac ) { | |
print $file | |
newf=${file/flac/m4a} | |
ffmpeg -i $file $newf | |
} |
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 -w | |
=begin | |
* Name : lastpara.rb | |
* Description : splits a file into paras based on a blank line and prints last one | |
* Author : rkumar | |
* Date : 2012-12-08 - 12:54 | |
* Last update : 2012-12-08 17:00 | |
* License : | |
Same as Ruby's License (http://www.ruby-lang.org/LICENSE.txt) |
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 zsh | |
# ----------------------------------------------------------------------------- # | |
# File: listquery | |
# Description: list files with query on size and age | |
# Author: rkumar http://github.com/rkumar/rbcurse/ | |
# Date: 2012-12-05 - 19:38 | |
# License: Same as Ruby's License (http://www.ruby-lang.org/LICENSE.txt) | |
# Last update: 2012-12-06 00:52 | |
# ----------------------------------------------------------------------------- # | |
# listquery Copyright (C) 2012 rahul kumar |
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 | |
# maintains a jump-list of the directories you actually use | |
# | |
# INSTALL: | |
# * put something like this in your .bashrc: | |
# . /path/to/z.sh | |
# In .zshrc, add the following. | |
#source ~/bin/z.sh | |
#function precwd () ; |
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
cd /usr/local/Library/Formula | |
# take out depends, removed everything other than dep, use awk to subtotal, sort on dep count | |
grep -h depends_on *.rb | sed 's/depends_on//g;s/=>//g' | tr -d "':\"" | awk '{ print $1}' | sort | subtotal.sh | sort -k 2 -n -t : |
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 zsh | |
# ----------------------------------------------------------------------------- # | |
# File: list | |
# Description: wrapper over 'ls' so I don't have to remember zsh's great expansions | |
# Author: rkumar http://github.com/rkumar/rbcurse/ | |
# Date: 2012-12-02 - 17:07 | |
# Last update: 2012-12-02 - 17:08 | |
# License: Free | |
# If you want to use 'v', get from https://gist.github.com/4188977 | |
# ----------------------------------------------------------------------------- # |
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 | |
# compute and print total occurrences for words in list | |
# e.g. dependincies or uses in brew | |
awk '{a[$1] ++} END{for (i in a) printf " %s: %2d \n",i, a[i]}' |
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
Your system is raring to brew. | |
HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew upgrade calcurse | |
==> Upgrading calcurse | |
rm /usr/local/bin/calcurse | |
rm /usr/local/share/man/man1/calcurse.1 | |
rm /usr/local/share/locale/nl/LC_MESSAGES/calcurse.mo | |
rm /usr/local/share/locale/fr/LC_MESSAGES/calcurse.mo | |
rm /usr/local/share/locale/es/LC_MESSAGES/calcurse.mo | |
rm /usr/local/share/locale/en/LC_MESSAGES/calcurse.mo |
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
/u/l/Cellar git:master ❯❯❯ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install proctools | |
==> Downloading http://downloads.sourceforge.net/project/proctools/proctools/0.4pre1/proctools-0.4pre1.tar.gz | |
Already downloaded: /Users/rahul/Library/Caches/Homebrew/proctools-0.4pre1.tar.gz | |
/usr/bin/tar xf /Users/rahul/Library/Caches/Homebrew/proctools-0.4pre1.tar.gz | |
==> Downloading patches | |
/usr/bin/curl -f#LA Homebrew 0.9.3 (Ruby 1.8.7-358; Mac OS X 10.7.5) https://trac.macports.org/export/89276/trunk/dports/sysutils/proctools/files/patch-pfind-Makefile.diff -o 000-homebrew.diff https://trac.macports.org/export/89276/trunk/dports/sysutils/proctools/files/patch-pfind-pfind.c.diff -o 001-homebrew.diff https://trac.macports.org/export/89276/trunk/dports/sysutils/proctools/files/patch-pgrep-Makefile.diff -o 002-homebrew.diff https://trac.macports.org/export/89276/trunk/dports/sysutils/proctools/files/patch-pkill-Makefile.diff -o 003-homebrew.diff https://trac.macports.org/export/89276/trunk/dports/sysutils/proctools/files/patch-pr |