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:
I hereby claim:
To claim this, I am signing this object:
<!-- 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 & Barbuda (+1268)</option> |
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" |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class CorsMiddleware | |
{ | |
/** | |
* Handle an incoming request. |
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.
Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.
Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask
If you already have Java
installed on your system, skip steps Install Cask and Install Java
If you already have Java
and Homebrew
installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
package main | |
import ( | |
"fmt" | |
"gopkg.in/mgo.v2" | |
"gopkg.in/mgo.v2/bson" | |
) | |
func main() { | |
session, err := mgo.Dial("localhost") | |
if err != nil { |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
) | |
func main() { |
The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.
With ffmpeg
this can be achieved with -c copy
. Older examples may use -vcodec copy -acodec copy
which does the same thing.
These examples assume ffmpeg
is in your PATH
. If not just substitute with the full path to your ffmpeg binary.
var sqrt = function(x) { | |
var isGoodEnough = function(guess) { | |
return Math.abs(guess * guess - x) / x < 0.001; | |
}; | |
var improve = function(guess) { | |
return (guess + x / guess) / 2; | |
}; | |
var sqrIter = function(guess) { |