Permalink
Browse files

Renamed aliases.sh to helpers.sh and updated README

  • Loading branch information...
1 parent 7845332 commit 4bd634e2733633d9091ae9b9cb67a9cccb9caf36 @derwiki committed Jun 23, 2011
Showing with 30 additions and 19 deletions.
  1. +1 −1 README
  2. +7 −5 bootstrap.sh
  3. +0 −13 functions.sh
  4. +22 −0 aliases.sh → helpers.sh
View
2 README
@@ -1,9 +1,9 @@
Collection of scripts that I find enhance my Command Line Experience (r)
- aliases.sh Simple aliases to make the shell more friendly
build_histogram.py Minimal library to produce histogram data
extract_invalid_emails.py Given a file as an argument or STDIN, print only bad email addresses
generate_email_chunk.sh Used to concatenate email segments and seed lists (probably only useful to me)
+ helpers.sh Simple aliases to make the shell more friendly
json2csv.py: Extract keys from newline seperated JSON dictionaries to CSV output
json2email_distribution.sh Given a JSON with an 'email' field, find the top domains and counts
senderscore.sh: Log to CSV the SMTP sender scores for blocks of IPs
View
@@ -12,12 +12,14 @@ mkdir $HOME/src
git clone git://github.com/derwiki/scripts.git
echo >> $HOME/.profile
echo "# autogenerated by github.com/scripts.git/bootstrap.sh" >> $HOME/.bash_profile
-echo "source $HOME/scripts/aliases.sh" >> $HOME/.bash_profile
+echo "source $HOME/scripts/helpers.sh" >> $HOME/.bash_profile
# At the time this was created, github was acting really flaky
# git clone https://github.com/git/git.git $HOME/src/git
-git clone git://git.kernel.org/pub/scm/git/git.git $HOME/src/git
-cd $HOME/src/git
-make && make install && echo "`git` compiles successfully"
-echo "alias git='$HOME/bin/git'" >> $HOME/.bash_profile
+git clone git://git.kernel.org/pub/scm/git/git.git $HOME/src/git && \
+ cd $HOME/src/git && \
+ make && \
+ make install && \
+ echo "'git' compiles successfully" && \
+ echo "alias git='$HOME/bin/git'" >> $HOME/.bash_profile
View
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-function waitforpid {
- while ps -p $1 1>/dev/null 2> /dev/null; do
- sleep 1;
- done
-}
-
-function waitforprocess {
- while ps -p $(pgrep $1) 1>/dev/null 2> /dev/null; do
- sleep 1;
- done
-}
View
@@ -1,3 +1,5 @@
+### Aliases ###
+
alias us_email_only_grep="grep -e '(.org\|.com\|.net\|.edu\|.mil\|.gov)'"
# these were tested on Linux but might not on OS X
@@ -12,3 +14,23 @@ alias rkf="grep -nr --include=*.rake"
alias s="screen -xRR"
alias git="$HOME/bin/git"
+
+
+
+### Functions ###
+
+# Usage:
+# waitforpid 311 ; sendEmail "long running task finished"
+function waitforpid {
+ while ps -p $1 1>/dev/null 2> /dev/null; do
+ sleep 1;
+ done
+}
+
+# Usage:
+# waitforprocess myscript.py ; sendEmail "long running script finished"
+function waitforprocess {
+ while ps -p $(pgrep $1) 1>/dev/null 2> /dev/null; do
+ sleep 1;
+ done
+}

0 comments on commit 4bd634e

Please sign in to comment.