Skip to content

Instantly share code, notes, and snippets.

View allenhsu's full-sized avatar
🎯
Focusing

Allen Hsu allenhsu

🎯
Focusing
View GitHub Profile
#!/bin/bash
#brew install mediainfo first
#chmod a+x check_audio_channels.sh for permission
#run ./check_audio_channels.sh dir_name to check
function check_dir() {
for file in `ls $1`
do
if [ -d $1"/"$file ]
@allenhsu
allenhsu / pod_licenses.sh
Created August 20, 2014 04:36
List licenses of used pods
pcregrep -o1 "pod '([^'/]*)[^']*'" Podfile|while read line ; do echo "\n\n==========\n$line\n==========" ; pod spec cat $line|grep license -A3 ; done
@allenhsu
allenhsu / autostart.sh
Created January 9, 2014 04:03
Script to auto start shadowsocks
#!/bin/bash
process="ssserver"
if [ $(ps ax | grep -v grep | grep $process | wc -l) -gt 0 ]; then
exit
else
cd /root/shadowsocks
nohup ssserver > log &
fi
#import <objc/runtime.h>
#import <UIKit/UIKit.h>
@interface UIWebView (HackishAccessoryHiding)
@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView;
@end
@implementation UIWebView (HackishAccessoryHiding)
static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView";