Skip to content

Instantly share code, notes, and snippets.

# enable:
adb tcpip 5555
adb connect $(adb shell ip -f inet addr show wlan0 | grep inet | tr -s '
' | cut -d ' ' -f 3 | cut -f 1 -d '/'):5555
# disable:
adb usb
@jrickerd
jrickerd / gist:a085a566dc53a0ddbe400a0c26e3cef8
Created October 27, 2016 06:39
Delete ES buckets matching name
for i in $(curl http://localhost:9200/_aliases | jq 'keys' | tr -d \", | grep d3_daily); do curl -XDELETE http://localhost:9200/$i; done
@jrickerd
jrickerd / gist:0ad42baebde4db539856
Last active November 18, 2015 01:58
Get ip for virtualbox bridge
ifconfig vboxnet1 | awk '/inet / {split($2, ary, /\//); print ary[1]}'
@jrickerd
jrickerd / gist:d39de4ce83087e363361
Created January 12, 2015 17:32
sed edit publsh
sed -i '' 's:joelteeter/declara:johnrickerd/Code:' ../client/SocialNetwork/publish_mobile.sh
xcodebuild -exportArchive -exportFormat ipa -archivePath "<something>.xcarchive" -exportPath "<app>.ipa" -exportProvisioningProfile "<provisioning profile name>"
@jrickerd
jrickerd / gist:120eb6f9cc7b3897b110
Created December 17, 2014 18:35
Uninstall android package
adb shell pm uninstall -k com.packagename
@jrickerd
jrickerd / gist:b1e048617b447d1e06c1
Created July 15, 2014 22:01
Uninstall android package
adb shell pm uninstall -k com.packagename
@jrickerd
jrickerd / gist:f9a785148f7e0352c97a
Created July 10, 2014 16:00
Open Chrome on android
am start -a android.intent.action.VIEW -n org.mozilla.fennec/.App -d file://sdcard/<file>
@jrickerd
jrickerd / gist:6039574
Created July 19, 2013 14:39
Inject jquery into page
var script = document.createElement("script");
script.src = "http://code.jquery.com/jquery-latest.min.js";
document.body.appendChild(script);
@jrickerd
jrickerd / ufw netmask
Created May 17, 2013 03:14
Add UFW rule with netmask
sudo ufw allow from 10.0. 0.0/8 to any port 3321