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
import React, { Component } from 'react'; | |
class MyComponent extends Component { | |
state = { | |
open: false, | |
} | |
} | |
export default MyComponent; |
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
curl -H "X-Line-ChannelID: {Channel ID}" \ | |
-H "X-Line-ChannelSecret: {Channe lSecret}" \ | |
-H "X-Line-Trusted-User-With-ACL: {MID}" \ | |
"https://trialbot-api.line.me/v1/profiles?mids={MID}" |
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
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_kernel.c(1853): OpenSSL: Loop: SSLv3 read client hello A | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_kernel.c(1853): OpenSSL: Loop: SSLv3 write server hello A | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_kernel.c(1853): OpenSSL: Loop: SSLv3 write certificate A | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_kernel.c(1853): OpenSSL: Loop: SSLv3 write key exchange A | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_kernel.c(1853): OpenSSL: Loop: SSLv3 write server done A | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_kernel.c(1853): OpenSSL: Loop: SSLv3 flush data | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_io.c(1929): OpenSSL: read 5/5 bytes from BIO#7f791f8c1600 [mem: 7f791f8c8c73] (BIO dump follows) | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_io.c(1862): +-------------------------------------------------------------------------+ | |
[Thu Apr 07 21:43:56 2016] [debug] ssl_engine_io.c(1901): | 0000: 15 03 03 00 02 ..... | | |
[T |
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
console.profile('Promise.all'); | |
console.time('Promise.all'); | |
var obj = [ | |
{a:"abc",b:123,c:true}, | |
{a:"efg",b:456,c:true}, | |
{a:"hij",b:789,c:false} | |
]; | |
var promises = obj.map(function(data) { |
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
% mkdir -p tmp/pids | |
% mkdir -p tmp/sockets |
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
/* | |
* Yet Another Sound-Novel | |
* WORK ONLY http://newclassic.jp/archives/4200 | |
* Usage: exec in browser console. ex) chrome developer tools | |
*/ | |
// parse text | |
var bbtext = function() { | |
var i = 0, t = jQuery('.story_main *:not(:has(img,script,noscript,iframe),img,script,noscript,iframe)').text().split('。'); | |
return function() { return t[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
#!/bin/env ruby | |
# -*- coding: utf-8; mode: ruby; -*- | |
require "yaml" | |
if ARGV.size == 1 | |
config = {} | |
database_url = ARGV.shift | |
params = database_url.split("/") | |
username = params[3] | |
host = params[2].split("@")[1] |
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
ruby lib/get_pgdb_config.rb `heroku config -s |grep SHARED_DATABASE_URL` |
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
heroku config:add FACEBOOK_APP_ID=000000000000000 | |
heroku config:add FACEBOOK_SECRET=26cae7718c32180a7a0f8e19d6d40a59 | |
heroku config:add LANG=ja_JP.UTF-8 |
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
$('#SELECTOR').on('keyup', function(e) { | |
if(e.keyCode == 13) { // Enter key code | |
do_something(); | |
} | |
}); |
NewerOlder