Skip to content

Instantly share code, notes, and snippets.

View hyongbai's full-sized avatar
💭
Adventuring

hyongbai hyongbai

💭
Adventuring
View GitHub Profile
@hyongbai
hyongbai / database.rules.json
Created June 28, 2023 09:18 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@hyongbai
hyongbai / docker.md
Created February 15, 2022 07:49 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@hyongbai
hyongbai / gist:498bc9e9358a6e2af86f3e72968308c3
Created November 15, 2018 07:17 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@hyongbai
hyongbai / byte-sizetuts.md
Last active September 28, 2016 07:38 — forked from honkskillet/byte-sizetuts.md
A series of golang tutorials with youtube videos.
@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);