Skip to content

Instantly share code, notes, and snippets.

View shizone's full-sized avatar

SUMIDA Yuki shizone

View GitHub Profile
@shizone
shizone / HentaiRank.scala
Created December 6, 2012 16:31
今まで変態AdventCalendarに記事をPostした数を集計して変態ランキングを作る
#!/usr/bin/env xsbtscript
!#
/***
scalaVersion := "2.9.2"
*/
import scala.xml.XML
import scala.io.Source
@shizone
shizone / irof.user.js
Created December 9, 2012 14:06
We are irof
// ==UserScript==
// @name We are irof
// @namespace http://shizone.github.com/
// @description irof Advent Calendar 2012/12/09.
// @include http://atnd.org/events/34079
// ==/UserScript==
(function() {
document.body.innerHTML = document.body.innerHTML.replace(
/<a href=\"\/users\/.*<\/a>/g,
・好きな言語は?
・好きなメソッドは?
・好きなアニメは?
・好きなガンダムシリーズは?
・githubアカウントは?
・英語しゃべれる?
・最近気になるテクノロジーは?
・最近行った勉強会は?
・最近登壇した勉強会は?
・iPhone落とした事ある?
@shizone
shizone / gist:6572029
Created September 15, 2013 16:05
Developer Consoleからコード突っ込んでクッキークリックしまくるやつ
var cookie = document.getElementById("bigCookie");
var e = document.createEvent("MouseEvents");
e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false,
false, false, false, 0, null);
window.setInterval( function() {
cookie.dispatchEvent(e);
}, 0)
@shizone
shizone / registration.py
Last active August 29, 2015 13:56
Check iOのRegistrationで怒られた
#python3.3 is inside
def checkio(els):
return reduce(lambda x,y: x+y, els[0:3])
if checkio([1, 2, 3, 4, 5, 6]) == 6:
print('Done!')
@shizone
shizone / njvote2014
Created March 5, 2014 03:26
#njvote2014 まとめ
1位 サツバツ・ナイト・バイ・ナイト 283票
2位 ファスト・アズ・ライトニング、コールド・アズ・ウインター 251票
3位 フー・キルド・ニンジャスレイヤー? 234票
4位 ノーホーマー・ノーサヴァイヴ 214票
5位 モータードリヴン・ブルース 195票
6位 リヴィング・ウェル・イズ・ザ・ベスト・リヴェンジ 178票
7位 ヘイル・トゥ・ザ・シェード・オブ・ブッダスピード 165票
8位 レプリカ・ミッシング・リンク 134票
9位 キリング・フィールド・サップーケイ 127票
10位 リボルバー・アンド・ヌンチャク 123票
@shizone
shizone / order.scala
Created November 5, 2014 17:49
gbdaitokai2014winter order
import java.util.Random
val s = List(
"Koutarou Ishizaki",
"ryosms",
"Takafumi Yoshida",
"英吉",
"Katsuhiro Masaki",
"山本裕介",
"Tomohiko Himura",
@shizone
shizone / dankogai.user.js
Created February 5, 2015 12:38
DanKogai
// ==UserScript==
// @name DanKogai
// @namespace http://shizone.github.io/
// @description DanKogai
// @include http://droidkaigi.github.io/
// ==/UserScript==
(function() {
document.title = document.title.replace(
/DroidKaigi/g, "DanKogai");
(defn reverse [x]
(loop [result nil acc (vec x)]
(if (empty? acc)
(apply str result)
(recur (conj result (first acc))
(rest acc)))))
(reverse "qwerty")
"ytrewq"
@shizone
shizone / greatest-common-divisor.clj
Last active August 29, 2015 14:19
最大公約数
(defn greatest-common-divisor [x y]
(loop [n (min x y)]
(if (and (= (rem x n) 0) (= (rem y n) 0))
n
(recur (dec n))
)
)
)
(greatest-common-divisor 12 18)