This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path('../config/application', __FILE__) | |
Rails.application.load_tasks | |
namespace :unicorn do | |
## | |
# Tasks | |
## | |
desc "Start unicorn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install -g gulp | |
$ npm install --save-dev gulp gulp-coffee gulp-sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch | awk "{print$1}" | xargs git branch -D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
restart = reset --hard HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nohud | |
set nosmoothscroll | |
set typelinkhints | |
let searchlimit = 100 | |
let scrollstep = 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$txt = 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4'; | |
$reg = '/iPhone OS ([0-9]+)_([0-9]+)/i'; | |
preg_match($reg, $txt, $result); | |
$str_version = $result[1] . '.' . $result[2]; //This variable should now contain : 4.0 | |
var_dump($result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var images = [ | |
"http://24.media.tumblr.com/tumblr_li92qz4NtI1qhhb8uo1_400.jpg", | |
"http://24.media.tumblr.com/tumblr_m80ziwHwTZ1qz6rb1o1_500.jpg", | |
"http://25.media.tumblr.com/tumblr_m7m1lm8nqe1qbyxr0o1_500.png" | |
]; | |
for (var i = 0, cnt = images.length; i < cnt; i++) { | |
new Image().src = images[i]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$appid = "APP_ID"; | |
$sentence = mb_convert_encoding("シュレーディンガーの猫(しゅれーでぃんがーのぬこ)とは、平行宇宙に無限に自分の虚像を投射することで存在していると考えられている、猫のような生物(UMA)ないし「存在」、もしくは「現象」あるいは「箱」である。「わけのわからないもの」とも。", 'utf-8', 'auto'); | |
$filter = "1|2|3|4|5|9|10"; | |
$data = http_build_query(array( | |
"appid" => $appid, | |
"sentence" => $sentence, | |
"filter" => $filter, | |
"result" => "ma" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
console.log( "start fizzbuzz...\n" ); | |
var fizzbuzz, result = []; | |
for ( var i = 1; i <= 100; i++ ) { | |
if ( i % 3 === 0 && i % 5 === 0 ) { | |
fizzbuzz = "fizzbuzz"; | |
} else if ( i % 3 === 0 ) { | |
fizzbuzz = "fizz"; |