Skip to content

Instantly share code, notes, and snippets.

Experiencing in rough sea

YMHuang ymhuang0808

Experiencing in rough sea
View GitHub Profile
View create_article_form_snippet.html
<form method="POST" action="<!-- URL -->">
<div class="form-group">
<label for="title">標題</label>
<input type="text" class="form-control" id="title" name ="title" placeholder="輸入標題">
<div class="form-group">
<label for="body">內容</label>
<textarea class="form-control" name="body" rows="3"></textarea>
<button type="submit" class="btn btn-default">送出</button>
View _blog_style.scss
body {
padding-top: 54px;
@media (min-width: 992px) {
body {
padding-top: 56px;
ymhuang0808 / libsodium_alice_bob.php
Last active Feb 14, 2017
Simple demo for public-key cryptography by libsodium in PHP
View libsodium_alice_bob.php
* Installation:
* Reference from:
// Alice
$alice_secret = "a9af0bc2b215f9c55734150d296256c8423705d43ddb3823ec99cf4f8fc2d79f";
$alice_public = "e7482479ac9f850248656659ee935e0acda8796cc5354a751f165b93a06e163e";

Keybase proof

I hereby claim:

  • I am ymhuang0808 on github.
  • I am johnhuang0808 ( on keybase.
  • I have a public key whose fingerprint is 481C 8A42 E5E6 5B94 82CC 23A0 71F4 61BD A920 18CE

To claim this, I am signing this object:


Diagnose information

Docker for Mac: version: 1.12.1 (2d5b4d9)
OS X: version 10.12 (build: 16A323)
logs: /tmp/E2010294-2643-4695-81A0-4355D20551C6/20160929-174317.tar.gz
[OK]     docker-cli
[OK]     virtualization kern.hv_support
[OK]     menubar
[OK]     moby-syslog
[OK]     dns
ymhuang0808 / error.log
Created Dec 7, 2015
Ushahidi Android Login Crash Log
View error.log
12-04 14:42:14.869 29644-29644/ E/AndroidRuntime: FATAL EXCEPTION: main
Process:, PID: 29644
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
ymhuang0808 / routes.php
Last active Dec 7, 2015
JWT-Auth for refreshing token
View routes.php
$api = app('Dingo\Api\Routing\Router');
// Version 1.0
$api->version('v1.0', function ($api) {
// ignore other endpoints
| Refresh token endpoint
ymhuang0808 / as-osm.geojson
Last active Sep 6, 2015
Academia Sinica GeoJSOn Export from OSM
View as-osm.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ymhuang0808 / string_hash_benchmark.rb
Last active Aug 29, 2015
Benchmark String and Hash in Ruby
View string_hash_benchmark.rb
require "benchmark"
precomputed_string = "Very long string value"*100
precomputed_symbol = precomputed_string.to_sym
MAP = {
"key1" => true,
:key2 => true,
precomputed_string => true,
precomputed_symbol => true
ymhuang0808 / Hands-on-writing-test-with-PHPUnit
Last active Aug 29, 2015
第一次用 PHPUnit 寫測試就上手
View Hands-on-writing-test-with-PHPUnit
## 一、什麼是測試?測試的重要性?