Skip to content

Instantly share code, notes, and snippets.

View romaonthego's full-sized avatar

Roman Efimov romaonthego

View GitHub Profile
@romaonthego
romaonthego / gist:859697
Created March 8, 2011 01:53
Local IP on Debian/Ubuntu
ifconfig|grep 'inet addr'|awk '{print $2}'|sed 's/addr://g'
@romaonthego
romaonthego / gist:823233
Created February 11, 2011 23:06
Remove .DS_Store (Mac OS X)
sudo find /WebServers -name ".DS_Store" -depth -exec rm {} \;
@romaonthego
romaonthego / genpassword
Created February 11, 2011 23:03
Bash script: genpassword
#!/bin/bash
charspool=('a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p'
'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' '0' '1' '2' '3' '4' '5' '6' '7'
'8' '9' '0' 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O'
'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z' '-' '_');
len=${#charspool[*]}
if [ $# -lt 1 ]; then