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 | |
tmpfile=/tmp/wman.$RANDOM | |
cmd=$1 | |
for n in $(seq 1 8) | |
do | |
w3m -dump http://linux.die.net/man/${n}/${cmd} > $tmpfile | |
answ=$(head -n1 $tmpfile) | |
if [ "${answ}" != "Not Found" ] | |
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
#!/bin/bash | |
alias latex='/usr/bin/latex' | |
alias dvipng='/usr/bin/dvipng' | |
alias convert='/usr/bin/convert' | |
#choose a number from 75-300 | |
density=300 | |
if [ $# != 2 ] | |
then | |
echo "Usage: $0 output_file latex_code" |
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/ruby | |
require 'date' | |
weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", | |
"Thursday", "Friday", "Saturday"] | |
month = ["", "January", "February", "March", "April", "May", | |
"June", "July", "August", "September", "October", | |
"November", "December"] |
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/ruby | |
require 'date' | |
weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", | |
"Thursday", "Friday", "Saturday"] | |
month = ["", "January", "February", "March", "April", "May", | |
"June", "July", "August", "September", "October", | |
"November", "December"] |
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 | |
str=$1 | |
list=$(ps -asW | grep ${str}) | |
#list=$(ps -asW | grep ${str} | awk '{print "[" NR "]", $0}') | |
OLDIFS=${IFS} | |
IFS=`echo -en "\n\b"` | |
i=0 | |
for line in ${list} | |
do | |
i=$((i+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
#!/bin/bash | |
calc_str=$1 | |
echo Example: clac \'5*3\' | \ | |
awk " | |
BEGIN{ | |
pi = 3.14159265359; | |
} | |
{print ${calc_str}}" |
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
function chtt { | |
echo -en "\033]2;$@\007" | |
} |
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
function cd_save_hist() { | |
if [ -z "$1" ] | |
then | |
d="$HOME" | |
else | |
d="$1" | |
fi | |
builtin cd "$d" | |
dp=$(pwd) | |
history -s cd ${dp} |
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 | |
RED=`echo -e '\033[31m'` | |
GREEN=`echo -e '\033[32m'` | |
BLUE=`echo -e '\033[36m'` | |
YELLOW=`echo -e '\033[33m'` | |
NORMAL=`echo -e '\033[0m'` | |
diff -uN $@ \ | |
| sed "s/^@@.*@@/$BLUE&$NORMAL/g" \ |
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
@echo off | |
C: | |
chdir C:/Users/jdevita/cygwin/bin | |
set HOME=\Users\jdevita\cygwin\home\jdevita | |
echo %1 > C:/Users/jdevita/cygwin/tmp/temp.txt | |
bash --login -i -c "jedi \"$(sed -e 's/\"//g' -e 's/\([A-Z]\):/\/cygdrive\/\1/' -e 's/\\\/\//g' -e 's/ *$//' /tmp/temp.txt)\"" |
OlderNewer