Skip to content

Instantly share code, notes, and snippets.

Yuku TAKAHASHI yuku

  • Increments Inc.
  • Tokyo, Japan
Block or report user

Report or block yuku

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
View buildURL.js
// @flow
type Params = {
[string]: string | number | null | Array<string | number | null>
}
function encode(val: string | number) {
return encodeURIComponent(val + '').
replace(/%40/gi, '@').
replace(/%3A/gi, ':').
View keybase.md

Keybase proof

I hereby claim:

  • I am yuku-t on github.
  • I am yuku (https://keybase.io/yuku) on keybase.
  • I have a public key whose fingerprint is 3D8F 2068 CA57 BED1 BF70 D47E 7B35 F14A 5953 BD16

To claim this, I am signing this object:

@yuku
yuku / benchmark.rb
Last active Oct 25, 2015
execjs - therubyracer v.s. Node.js
View benchmark.rb
require "benchmark/ips"
require "execjs"
require "open-uri"
source = open("http://coffeescript.org/extras/coffee-script.js").read
RUNTIMES = [
ExecJS::Runtimes::RubyRacer,
ExecJS::Runtimes::Node,
]
View 50english.rb
#!/usr/bin/env ruby
SENTENCES = [
# 1
'Once you see all those animals, you should feel better.',
'I need to fix my car as soon as possible.',
'I hope it snows all day long tomorrow.',
'Can I get you anything?',
'How many apples did you eat today?',
"If it is possible, I'd like to have a Diet Coke.",
@yuku
yuku / file0.rb
Last active Dec 17, 2015
Qiitaの画像アップロード機能も簡単に実装できる。そう、S3ならね。 ref: http://qiita.com/yuku_t/items/40b7daf018d3dab48974
View file0.rb
S3_BUCKET = 'xxx'
AWS_SECRET_KEY = 'xxx'
AWS_ACCESS_KEY_ID = 'xxx'
# アクセスしてきたクライアントにS3へアップロードするためのpolicyと
# それをハッシュ化したsignatureを返す。
def policies
# 0. セッションの確認など
# 1. 画像情報をバリデーションする
View bootstrap-pagination.js
// bootstrap-pagination.js
// (c) 2012 Yuku Takahashi
// Freely distributed under the MIT license.
;(function($) {
'use strict'; // jshint
@yuku
yuku / ecma5.js
Created Nov 14, 2011
ECMAScript 5
View ecma5.js
// 8.6.2 Object Internal Properties and Methods
// Evenry ECMAScript object has a Boolean-valued [[Extensible]] internal
// property that controls whether or not named properties may be added to the
// object. If the value of the [[Extensible]] internal property is false then
// additional named properties may not be added to the object. In addition, if
// [[Extensible]] is false the value of the [[Class]] and [[Prototype]]
// internal properties of the object may not be modified. Once the value of an
// [[Extensible]] internal property has been set to false it may not be
// subsequently changed to true.
@yuku
yuku / jawikicorpus.py
Created Jun 22, 2011
gensimに日本語Wikipediaを取り込むためのスクリプト
View jawikicorpus.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import sys
import os.path
import bz2
from gensim.corpora import WikiCorpus
from gensim.corpora.wikicorpus import filterWiki
You can’t perform that action at this time.