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 | |
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}" | |
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/sh | |
lsof -n -i4TCP:$1 | grep LISTEN | |
pid=`lsof -n -i4TCP:$1 | grep LISTEN | awk '{print $2}'` | |
if [ $pid ] | |
then | |
kill -9 $pid | |
echo "[`date "+%Y-%m-%d %H:%M:%S"`] Process kill successfull!" | |
else | |
echo "[`date "+%Y-%m-%d %H:%M:%S"`] No process exists on port $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
cdd () { | |
repo_folder="/Work/Development" | |
test=`find $repo_folder/* -maxdepth 0 -type d | grep -i "$1" -m 1` | |
if [ ! $1 ] || [ ! $test ]; then | |
cd $repo_folder | |
else | |
cd $test | |
fi | |
} |
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
@interface UIImage (fixOrientation) | |
- (UIImage *)fixOrientation; | |
@end |