Skip to content

Instantly share code, notes, and snippets.


Keitaroh Kobayashi keichan34

Block or report user

Report or block keichan34

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
keichan34 / package.json
Created Jul 23, 2018
hacking CRA to work with babel-plugin-relay
View package.json
"scripts": {
"build": "node ./setup && react-scripts build"
keichan34 /
Last active Mar 12, 2017 — forked from jeremy-w/
Fish function to create or reply to a social post on 10 Centuries. MPLv2
function blurb --description Post\ to\ 10C.\\nblurb\ post\ MESSAGE\\nblurb\ POST_ID\ REPLY --argument reply_id message
set -l endpoint
set -l usage 'blurb: post or reply to a message on 10C
blurb post MESSAGE
Post a new blurb

Keybase proof

I hereby claim:

  • I am keichan34 on github.
  • I am sleepy_keita ( on keybase.
  • I have a public key ASASuKTnKfWXIiwyRu4jyTDn-i8LUj1qZLrKHeNPRBtlsAo

To claim this, I am signing this object:

keichan34 / hi.exs
Last active Sep 17, 2016
compile-time list
View hi.exs
defmodule Hi do
keys = ~w(hello there)a
for {key, idx} <- Enum.with_index(keys) do
def index_of_key(unquote(key)) do
{:ok, unquote(idx)}
def key_at_index(unquote(idx)) do
{:ok, unquote(key)}
keichan34 /
Last active May 26, 2016
I got tired of loading nvm every time in my fish shell, so this.
# Requires bass and nvm
# bass:
# nvm:
function nvm
set -g NVM_LOADED "1"
bass source ~/.nvm/ ';' nvm $argv
function ensure_nvm_loaded
keichan34 / ses_credential_generator.exs
Created Mar 26, 2016
Amazon SES SMTP Credential Generator
View ses_credential_generator.exs
#!/usr/bin/env elixir
key = case System.argv do
[key | _] -> key
_ ->
IO.puts "Usage: ses_credential_generator.exs [AWS Secret Access Key]"
keichan34 / .babelrc
Last active Sep 11, 2016
Sample Phoenix + Brunch (Babel) + Mocha test setup for unit tests
View .babelrc
"presets": ["es2015"]
View msd.php
header("Content-Type: application/rss+xml");
function formatTime($duration) //as hh:mm:ss
$hours = floor($duration / 3600);
$minutes = floor( ($duration - ($hours * 3600)) / 60);
$seconds = $duration - ($hours * 3600) - ($minutes * 60);
View results.txt
~/Desktop > ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
~/Desktop > ruby ./concat_benchmark.rb
Calculating -------------------------------------
Interpolation 81.309k i/100ms
Array + join 65.714k i/100ms
String concatenation 62.816k i/100ms
String mutation 68.529k i/100ms
View simple-hello-world.ex
defmodule SimpleHelloWorld do
import Plug.Conn, only: [resp: 3, halt: 1]
def init(_), do: nil
def call(%{request_path: request_path} = conn, _) when request_path == "/" do
|> resp(200, "Hello, world!")
|> halt
You can’t perform that action at this time.