Skip to content

Instantly share code, notes, and snippets.

View otiai10's full-sized avatar
👋

Hiromu OCHIAI otiai10

👋
View GitHub Profile
@otiai10
otiai10 / create.json.response.md
Last active December 20, 2015 03:18
POST friendships/create.jsonのレスポンス
def dump(d):
  for k,v in d.items():
    print("--------", k, "--------------")
    try:
      print(v)
    except:
      print('[sorry]')
      pass
@otiai10
otiai10 / problems.md
Created July 27, 2013 06:34
Problems in speedweary

alts does not appear alter btn

-- unvisible 3 2013-07-27 15:21:14.158 speedweary[97516:c07] alt00 -> 7 2013-07-27 15:21:14.159 speedweary[97516:c07] alt01 -> 1 2013-07-27 15:21:14.159 speedweary[97516:c07] alt02 -> 3

-- unvisible 7 2013-07-27 15:22:01.477 speedweary[97516:c07] alt00 -> 5 2013-07-27 15:22:01.477 speedweary[97516:c07] alt01 -> 4

@otiai10
otiai10 / sbt.txt.md
Created July 31, 2013 12:10
sbtが失敗するからとりあえず"sbt --help"したんですよ。そしたら依存パッケージのインストールが始まったんすよ。なんでやねん。 しかもウケることに、まいかい挙動が違うんスよw 何回もやったら全部入ったっぽいです (´≝◞⊖◟≝`)
[20:53:56]otiai10 % sbt --version
ssbt launcher version 0.12.4
[20:54:02]otiai10 % sbt --help
Getting net.java.dev.jna jna 3.2.3 ...
downloading http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.2.3/jna-3.2.3.jar ...
  [SUCCESSFUL ] net.java.dev.jna#jna;3.2.3!jna.jar (2531ms)
:: retrieving :: org.scala-sbt#boot-jna
	confs: [default]
	1 artifacts copied, 0 already retrieved (838kB/19ms)
retweeted
False
text
GoodMorning 7
in_reply_to_screen_name
None
user
xxx
id
362829875683397632
{'friends': [140021552, 4962081, 128187038, 136241877, 146322111, 116607469]}
{
 'id_str': '364653006429495296',
 'created_at': 'Tue Aug 06 07:43:46 +0000 2013',
 'coordinates': None,
 'geo': None,
 'favorite_count': 0,
@otiai10
otiai10 / hoge.md
Last active December 21, 2015 01:29
たぶんこれ

[Thu Aug 08 13:17:08 +0000 2013]

{
'coordinates': None,
'contributors': None,
'truncated': False,
'id_str': '365461677765967872',
'in_reply_to_screen_name': 'kenmochi',
'in_reply_to_user_id': 14428667,
'in_reply_to_status_id_str': '365384606070996992',
@otiai10
otiai10 / zeroPadding.js
Created August 20, 2013 04:02
JSっぽいコードってこんなん?
function myNum(num) {
this.value = num;
}
myNum.prototype.toString = function(){
return String(this.value);
}
myNum.prototype.increment = function(){
this.value++;
return this;
}
@otiai10
otiai10 / removeUnkoFromObject.js
Last active December 21, 2015 08:28
これもっと良い実装知りませんか?
var obj = {
'hoge' : 1,
'fuga' : 2,
'unko' : 3,
'piyo' : 4,
};
// unkoだけ削除したい
var remove = function(_k, _obj){
var updated = {};
@otiai10
otiai10 / serverIP.md
Last active December 21, 2015 20:29
各地鎮守府のAPIサーバのIPが違うんではないかと予想している。Extensionのpermissionsを「すべてのウェブページ」にしてしまえば容易に解決するんだけど、それはそれで嫌かな、と思う。でもインスコのときに「125.6.188.25へのアクセスを許可しますか?」と聞かれるのも、それはそれで気持ち悪い気もする。うーん 👿
// 横須賀
// 呉
"http://125.6.184.16/*"// 佐世保
// 舞鶴
// 大湊
// トラック泊地
"http://125.6.188.25/*"//これ多分リンガ泊地
// ラバウル基地
@otiai10
otiai10 / gist:6375955
Created August 29, 2013 09:17
api_response
```
svdata={"api_result":1,"api_result_msg":"\u6210\u529f","api_data":[{"api_member_id":623525,"api_id":1,"api_sortno":69,"api_name":"\u6f23","api_yomi":"\u3055\u3056\u306a\u307f","api_stype":2,"api_ship_id":94,"api_lv":14,"api_exp":9284,"api_afterlv":20,"api_aftershipid":232,"api_nowhp":15,"api_maxhp":15,"api_taik":[15,29],"api_souk":[12,19],"api_houg":[19,29],"api_raig":[54,69],"api_baku":[0,0],"api_tyku":[24,39],"api_houm":[0,0],"api_raim":[0,0],"api_saku":[6,19],"api_luck":[10,49],"api_soku":10,"api_leng":1,"api_slot":[105,19,-1,-1,-1],"api_onslot":[0,0,0,0,0],"api_broken":[1,1,5,0],"api_powup":[0,1,0,0],"api_kyouka":[7,20,10,7],"api_backs":1,"api_fuel":15,"api_fuel_max":15,"api_bull":20,"api_bull_max":20,"api_gomes":null,"api_gomes2":null,"api_slotnum":2,"api_ndock_time":0,"api_ndock_time_str":"00:00:00","api_ndock_item":[0,0],"api_star":2,"api_srate":2,"api_cond":49,"api_karyoku":[19,29],"api_raisou":[54,69],"api_taiku":[24,39],"api_soukou":[12,19],"api_kaihi":[46,79],"api_taisen":[24,49],"api_sakuteki"