Skip to content

Instantly share code, notes, and snippets.

View casoetan's full-sized avatar
💯

Charles Soetan casoetan

💯
View GitHub Profile
<?php
namespace App\Http\Middleware;
use Closure;
class CorsMiddleware
{
/**
* Handle an incoming request.
@casoetan
casoetan / gist:2c4795d650c4b0043643c1032bae443a
Created November 6, 2016 06:21 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@casoetan
casoetan / html_for_international_calling coes.htm
Created November 2, 2016 12:10 — forked from andyj/html_for_international_calling coes.htm
HTML <select> international calling codes for each country
<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="">
<option data-countryCode="GB" value="44" Selected>UK (+44)</option>
<option data-countryCode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option>
<option data-countryCode="AG" value="1268">Antigua &amp; Barbuda (+1268)</option>

Keybase proof

I hereby claim:

  • I am casoetan on github.
  • I am casoetan (https://keybase.io/casoetan) on keybase.
  • I have a public key whose fingerprint is 5ADD 841C 2CEB 6F33 BEA6 0AE6 71C3 25A9 19A7 B50E

To claim this, I am signing this object: