Skip to content

Instantly share code, notes, and snippets.

View dfreniche's full-sized avatar

Diego Freniche dfreniche

View GitHub Profile
@dfreniche
dfreniche / get_provisioning_profile_name
Created September 11, 2014 10:29
bash alias to print human-readable names from iOS provisioning profiles
# print human-readable names from iOS provisioning profiles
get_provisioning_profile_name() {
strings $1 | grep -A 1 "<key>Name</key>" | sed 's/<key>//' | sed 's/<string>//'
}
alias namepp=get_provisioning_profile_name
get_all_provisioning_profile_names() {
@dfreniche
dfreniche / swift.sh
Created August 28, 2014 06:07
Bash script to launch swift from command line, with all Xcode6-Betas around
#!/bin/bash
# swift.sh: Bash script to launch swift from command line
# it works even with Xcode5 and several Xcode-Beta installed
NEW_XCODE=$(ls -m1 -d /Applications/Xcode6* | tail -r -n 1)/Contents/Developer
echo using $NEW_XCODE
$NEW_XCODE/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -sdk $NEW_XCODE
@dfreniche
dfreniche / gist:6753889
Created September 29, 2013 16:14
My OS X alias
alias ls="ls -alFGh"
@dfreniche
dfreniche / update-date.sh
Last active December 20, 2015 07:09
A small bash script to find all files with wrong date (1 Jan 1970) and set to current date. Tested in Mac (OS X 10.8) but should work in other UNIXes
#!/bin/bash
#update-date.sh: a small script to find all files with wrong date (1 Jan 1970) and set to current date
COMP_FILE=$HOME/comp_file_delete_me
touch -t 197001020101 $COMP_FILE
echo Comparing with $COMP_FILE
echo Obtaining list of files with wrong date. Will take some time…
find ./ -depth -type f -not -newer $COMP_FILE -print -exec touch {} \;