This file contains hidden or 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 | |
$input = 'hoge00'; | |
$trials = 100000; | |
$tic = microtime(true); | |
for ($i = 0; $i < $trials; $i++) { | |
preg_match("/^[0-9]+$/", $input); | |
} | |
echo (string)(microtime(true) - $tic) . "\n"; |
This file contains hidden or 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
$ brew install sshrc |
This file contains hidden or 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
log-2016-02-01-00.log | |
log-2016-02-01-01.log | |
... | |
log-2016-02-01-22.log | |
log-2016-02-01-23.log | |
log-2016-02-02-00.log |
This file contains hidden or 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
- name: Check Dock | |
shell: "defaults read com.apple.dock | grep autohide > /dev/null && test `defaults read com.apple.dock autohide` -eq 1; echo $?" | |
register: is_autohide | |
changed_when: is_autohide.stdout != '0' | |
- name: Autohide Dock | |
shell: "defaults write com.apple.dock autohide -int 1" | |
notify: Restart Dock | |
when: is_autohide.stdout != '0' |
This file contains hidden or 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
<div class="cbox"> | |
<div class="ctitle"> | |
<img src="https://avatars.githubusercontent.com/ikuwow?s=40">ikuwow's Contributions | |
</div> | |
<div class="cbody"> | |
<img src="http://ghchart.rshah.org/ikuwow" alt="ikuwow's Github chart"><a href="https://github.com/ikuwow" target="_blank">See on GitHub</a> | |
</div> | |
</div> |
This file contains hidden or 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 pull origin master | |
Unable to connect ... connection refused 503(うろ覚え) |
This file contains hidden or 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 xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function(){ | |
if (this.readyState==4 && this.status==200) { | |
// responseをhogehogeする | |
} | |
}; | |
xhr.responseType = 'json'; | |
xhr.open('GET',endpoint,true); | |
xhr.send(); |
This file contains hidden or 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
create table if not exists users ( | |
id serial not null primary key, | |
email varchar(255) not null, | |
name varchar(255) not null, | |
password varchar(255) not null, | |
created datetime not null default now() | |
) engine=innodb; |
This file contains hidden or 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
package main | |
import ( | |
"os" | |
"fmt" | |
"net/http" | |
"github.com/m0a/easyjson" | |
) | |
var api = "https://teratail.com/api/v1" |
This file contains hidden or 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
$ say hello | |
# "hello"って言う |