Skip to content

Instantly share code, notes, and snippets.

CREATE [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name
[index_type]
ON tbl_name (index_col_name,...)
[index_option]
[algorithm_option | lock_option] ...
//CREATE INDEX idx_foo_column ON tbl_bar (foo_column DESC)
@okuyan
okuyan / gist:382624f6589bd7f35d3f
Created December 15, 2014 18:28
[js] 50% chance
var a = b = 0;
for (i = 0; i < 100; i++) {
if (Math.round( Math.random()) > 0) {
a++;
} else {
b++;
}
}
var addFive = function(num){
if (this.hoge === undefined) {
this.hoge = 1;
}
return num + 5 + this.hoge;
};
console.log(addFive(4)); //10
console.log(addFive.apply(null, [4])); //10
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var add = function(x, y) {
@okuyan
okuyan / workflow.yml
Last active July 21, 2020 02:41
Deploy Gatsby site on Firebase hosting using Github actions
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest