start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env bash | |
# Author: Bruno Gama | |
echo $(basename "$(mdfind "kMDItemCFBundleIdentifier == '$(/usr/bin/plutil -convert xml1 -o - ~/Library/Preferences/com.apple.LaunchServices.plist | grep -B 3 "<string>http</string>" | tail -3 | head -n1 | sed -e 's/<[^>]*>//g' | sed 's/[[:space:]]//g' | tr -d '\040\010\012\015')'cd")" | sed s'/.app$//') |
#!/usr/bin/env python -tt | |
# -*- encoding: utf-8 -*- | |
# License: Beerware | |
from __future__ import print_function | |
import urllib | |
import json | |
AUTHOR = 'Bruno Gama' | |
TWITTER = '@brunogama' |
#!/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 |
$('.episodecell').each(function(index){ window.location = $(this).attr('href').replace('episode', 'delete_item') }); |
git ls-remote --tags origin | awk '/^(.*)(\s+)(.*[a-z])$/ {print ":" $2}' | xargs git push origin |
git tag -l | awk '/^(.*[a-z])$/ {print $1}' | xargs git tag -d |
#! /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 |
osascript -e 'tell application "iOS Simulator" to quit' | |
osascript -e 'tell application "Simulator" to quit' | |
xcrun simctl erase all |
public extension String | |
{ | |
public var localized: String { | |
return NSLocalizedString(self.lowercased(), tableName: nil, bundle: .main, value: "", comment: "") | |
} | |
} |