Skip to content

Instantly share code, notes, and snippets.

View hyongbai's full-sized avatar
💭
Adventuring

hyongbai hyongbai

💭
Adventuring
View GitHub Profile
#!/system/bin/sh
#Adding insecured adb (adbd)
#Ported to bash script by mattlgroff.
#Dear Chainfire, learn2OpenSource.
su -c 'mount -o remount,rw /'
su -c 'stop adbd'
su -c 'cat /sbin/adbd > /sbin/adbd.original'
su -c 'rm /sbin/adbd'
su -c 'cat /system/usr/adbd > /sbin/adbd'
su -c 'chown 0.0 /sbin/adbd'
@hyongbai
hyongbai / node-weather.js
Last active September 16, 2015 07:18 — forked from ydn/node-weather.js
Weather API
var YQL = require('yql');
var query = new YQL('select * from weather.forecast where (location = 94089)');
query.exec(function(err, data) {
var location = data.query.results.channel.location;
var condition = data.query.results.channel.item.condition;
console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.');
});
urlencode() {
# urlencode <string>
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c"
esac
# Copyright: Benjamin Weiss (keyboardsurfer) https://github.com/keyboardsurfer
# Under CC-BY-SA V3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode)
# built application files
*.apk
*.ap_
*.jar
!gradle/wrapper/gradle-wrapper.jar
# lint folder
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);
@hyongbai
hyongbai / sote
Created July 19, 2012 06:56
sote
sote