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 bash | |
# clean_ios_simulator | |
# Author: Bruno Gama | |
pkill -9 -fi simulator 2>/dev/null | |
_WD="$HOME/Library/Application Support/iPhone Simulator" | |
find "$_WD" -iname "*.app" | while read l; do | |
f=$(dirname "$l") | |
rm -rf "$f" | |
unset f |
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
$('.episodecell').each(function(index){ window.location = $(this).attr('href').replace('episode', 'delete_item') }); |
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
git ls-remote --tags origin | awk '/^(.*)(\s+)(.*[a-z])$/ {print ":" $2}' | xargs git push origin |
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
git tag -l | awk '/^(.*[a-z])$/ {print $1}' | xargs git tag -d |
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 bash | |
NEXT_SKYPE_PROCESS=$(echo $(( $(ps aux | grep skype | grep -v "grep" | wc -l | tr -d '[[:space:]]') + 1))) | |
open -na $(mdfind 'kMDItemFSName == "Skype.app"'cd) --args -DataPath /Users/$(whoami)/Library/Application\ Support/Skype${NEXT_SKYPE_PROCESS} | |
unset NEXT_SKYPE_PROCESS | |
exit 0 |
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
slnamepwd() { | |
mdfind -onlyin $PWD -name $* | |
SLNAMETOTAL=$(mdfind -count -onlyin $PWD -name $*) | |
printf "\nTotal files found ${SLNAMETOTAL}\n" | |
} |
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
#import <Foundation/Foundation.h> | |
typedef void (^VoidBlock)(); | |
@interface NSTimer (NSTimer_Additions) | |
+ (NSTimer *)scheduleTimerWithTimeInterval:(NSTimeInterval)theSeconds repeats:(BOOL)repeats actions:(VoidBlock)actions; | |
@end |
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
sudo scutil --set HostName computer-name.local |
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
# Kill it Like a Boss | |
function vaporize { | |
QSTRING=$* | |
PROC=`ps aux | grep ${QSTRING} | grep -v grep | awk '{print $2}'` | |
if [ ! -n "$PROC" ]; then | |
echo "0 PID found with the matching String: \"${QSTRING}\"." | |
else | |
NUMPROC=`echo $PROC | awk '{print NF}'` | |
echo "Found $NUMPROC PIDs with the matching String: \"${QSTRING}\"." | |
sudo kill -9 $PROC |
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
updateMalwareDefinitions() { | |
sudo /usr/libexec/XProtectUpdater | |
echo "Last Malware Definitions $(defaults read /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta LastModification)" | |
} |
OlderNewer