Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am sragu on github.
* I am sragu (https://keybase.io/sragu) on keybase.
* I have a public key whose fingerprint is 7E2C 829F 3CED 0E54 E26A 595B 0308 428E 1807 B91D
To claim this, I am signing this object:
@sragu
sragu / ios_provision_name
Last active January 1, 2016 12:09
ios read the mobiprovision file name from ipa Usage: ios_provision_name ./build/uat/ShinyiOSApp.ipa
#!/bin/sh
unzip -p $1 Payload/*.app/embedded.mobileprovision | strings | grep -A1 '<key>Name</key>' | tail -n1 | awk -F'[<>]' -v file=$1 '{print $3, " -> ", file}'
@sragu
sragu / jsonbeautify
Created September 25, 2011 07:15
Android grub json, and pass to jsonlint and print inline
#!/usr/local/bin/gawk -f
#Android grub json, and pass to jsonlint and print inline
#usage adb logcat | jsonbeautify
{print} match($0, "Raw HTTP Response:(.*)$", a) {print "---";print a[1] | "jsonlint"; close("jsonlint"); print "---";}
mkdir -p ~/Dropbox/git-repo/dotfiles.git
cd ~/Dropbox/git-repo/dotfiles.git
git init --bare
##Srinivasan Raguraman
##Shell script to extract current message from whatthecommit.com
#Add the below snippet to you .profile/.bashrc
whatthecommit(){
curl -s http://whatthecommit.com/ | tr -s '\n' ' ' \
| grep -so 'p>\(.*\)</p' | sed -n 's/..\(.*\)..../\1/p';
}
#Sample Usage:
# git commit -m"Jira #404 - `whatthecommit`"