Skip to content

Instantly share code, notes, and snippets.

Toru Furukawa torufurukawa

  • Tokyo, Japan
Block or report user

Report or block torufurukawa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
torufurukawa / hello.js
Created May 12, 2020
Next.js cookie-session example
View hello.js
// pages/api/hello.js
import CookieSession from 'cookie-session'
const cookieSession = CookieSession({ name: 'session', keys: ['foo', 'bar'] })
function runMiddleware(req, res, fn) {
return new Promise((resolve, reject) => {
fn(req, res, result => {
if (result instanceof Error) {
return reject(result)
torufurukawa / google-script-run-promise.js
Last active Jul 17, 2019
Make looks a promise
View google-script-run-promise.js
// Converted for ES6
function scriptRunPromise() {
const gs = {};
// contains doSomething() methods at runtime.
// Object.keys( returns array of method names.
const keys = Object.keys(;
// for each key, i.e. method name...
View image-uploader.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Image Uploader</title>
torufurukawa /
Created Dec 12, 2018
Twitter Direct Message Chatbot example
# coding: utf8
from flask import Flask
app = Flask(__name__)
def hello():
return 'Hello World!'
View mkgoenv
# activate
cat << 'EOS' > activate
export GOPATH=$(pwd)
export PATH=${PATH}:$(pwd)/bin
# VS Code setting
mkdir -p .vscode
View keybindings.json
// 既定値を上書きするには、このファイル内にキー バインドを挿入します
// Moving cursor
{ "key": "ctrl+p", "command": "cursorUp",
"when": "editorTextFocus" },
{ "key": "ctrl+n", "command": "cursorDown",
"when": "editorTextFocus" },
{ "key": "ctrl+f", "command": "cursorRight",
"when": "editorTextFocus"},
{ "key": "ctrl+b", "command": "cursorLeft",
View gist:0f01b6ec35ee56f37acd105028ec1609
package main
import (
func main() {
var p Point = Point{2, 3}
var q Quality = Quality{99.9}
View gist:e6158bb10ccc6b166a474ace273613e4
package main
import (
func main() {
in1 := make(chan int)
in2 := make(chan string)
done := make(chan bool)
torufurukawa / keymap.cson
Created Nov 18, 2016
Atom keymap settings
View keymap.cson
# Your keymap
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
View gist:bd5a5fb027306627488e
package main
import (
func main() {
You can’t perform that action at this time.