docker run --rm sentry config generate-secret-key
でSECRET_KEYを生成する- SECRET_KEYを環境変数にいれる
export SENTRY_SECRET_KEY="your generated secret key"
docker-compose up -d
でサービスあげる。docker-compose run -rm sentry sentry upgrade
で初期設定するdocker-compmse restart
で再起動- Go http://localhost:9000 and get sentry!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object GeoHash{ | |
val base32 = "0123456789bcdefghjkmnpqrstuvwxyz" | |
def encode( longtitude:Double, latitude:Double, range:Double) = { | |
def asBit( d:Double,max:Double,min:Double ) : List[Boolean] = { | |
val mid = ( max + min ) / 2 | |
var res = ( d >= mid ) | |
val (m,n) = if( res ) (max,mid) else (mid,min) | |
if( Math.abs( m - n ) <= range ) | |
res :: Nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 :水先案名無い人:2011/12/03(土) 11:12:19.45 ID:bTIMyqpW0 | |
,;' '" '' ゛''" ゛' ';;,, | |
(rヽ,;''"""''゛゛゛'';, ノr) | |
,;'゛ i _ 、_ iヽ゛';, お前それ関数型言語でも同じ事言えんの? | |
,;'" ''| ヽ・〉 〈・ノ |゙゛ `';, | |
,;'' "| ▼ |゙゛ `';, | |
,;'' ヽ_人_ / ,;'_ | |
/シ、 ヽ⌒⌒ / リ \ | |
| "r,, `"'''゙´ ,,ミ゛ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Received: by 10.170.200.130 with SMTP id r124csp566647yke; | |
Mon, 26 Jan 2015 17:40:13 -0800 (PST) | |
X-Received: by 10.236.7.39 with SMTP id 27mr10135662yho.16.1422322813088; | |
Mon, 26 Jan 2015 17:40:13 -0800 (PST) | |
Authentication-Results: mx.google.com; | |
spf=none (google.com: yasuhiro@wahlandcase.com does not designate permitted sender hosts) smtp.mail=yasuhiro@wahlandcase.com; | |
dkim=pass header.i=@wahlandcase.com | |
Received-SPF: none (google.com: yasuhiro@wahlandcase.com does not designate permitted sender hosts) client-ip=210.224.168.166; | |
Received: by 10.170.124.9 with POP3 id q9mf1527070ykb.31; | |
Mon, 26 Jan 2015 17:40:12 -0800 (PST) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Delivered-To: helmettomo@gmail.com | |
Received: by 10.129.121.20 with SMTP id u20csp861396ywc; | |
Mon, 19 Sep 2016 01:14:24 -0700 (PDT) | |
X-Received: by 10.13.204.87 with SMTP id o84mr24656150ywd.299.1474272863926; | |
Mon, 19 Sep 2016 01:14:23 -0700 (PDT) | |
Authentication-Results: mx.google.com; | |
spf=neutral (google.com: 133.242.250.102 is neither permitted nor denied by best guess record for domain of khorie@wanderlust.co.jp) smtp.mailfrom=khorie@wanderlust.co.jp; | |
dkim=pass header.i=@wanderlust-co-jp.20150623.gappssmtp.com | |
Received-SPF: neutral (google.com: 133.242.250.102 is neither permitted nor denied by best guess record for domain of khorie@wanderlust.co.jp) client-ip=133.242.250.102; | |
Received: by 10.129.42.135 with POP3 id q129mf23827744ywq.2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Received: by 10.202.106.74 with SMTP id f71csp251115oic; | |
Tue, 4 Jul 2017 19:42:52 -0700 (PDT) | |
X-Received: by 10.202.85.212 with SMTP id j203mr27110703oib.174.1499222571214; | |
Tue, 04 Jul 2017 19:42:51 -0700 (PDT) | |
Authentication-Results: mx.google.com; | |
spf=neutral (google.com: 133.242.250.104 is neither permitted nor denied by best guess record for domain of a-takeda@shashoku-collection.jp) smtp.mailfrom=a-takeda@shashoku-collection.jp; | |
dkim=neutral (body hash did not verify) header.i=@shashoku-collection-jp.20150623.gappssmtp.com header.b=MZougrB6 | |
Received-SPF: neutral (google.com: 133.242.250.104 is neither permitted nor denied by best guess record for domain of a-takeda@shashoku-collection.jp) client-ip=133.242.250.104; | |
Received: by 10.202.86.195 with POP3 id k186mf60078182oib.1; | |
Tue, 04 Jul 2017 19:42:51 -0700 (PDT) |
Why Uber Engineering Switched from Postgres to MySQL - Uber Engineering Blog のまとめ
Posgresqlだと
- pgは追記型なので少しの更新でも多くのdiskへのwriteがおきる
- カラムを一つ更新しただけで多くのindexの書き換えが起こる
- よって、replicationはWALを送るので更新が多いとWALが大量に送られる
- repcliationでは物理的なdiskの変更を送る
- DC間でレプリするときつい
- bugがあってreplica間でMVCCの不整合が起きる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AttrInquirable | |
# wraps value of attribute in ActiveSupport::StringInquirer. | |
# | |
# Usage: | |
# | |
# class Person < ActiveRecord::Base | |
# attr_inquireable :status | |
# end | |
# | |
# person = Person.new(:status => :pending) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.util.function.*; | |
public class Fold { | |
// 自作fold関数 | |
// 引数に List<T> と、2引数の演算を行うBiFunction<T, T, T>をとって、 | |
// listを順番にfで畳み込む | |
public static <T> T fold(List<T> list, BiFunction<T, T, T> f) { | |
T res = list.get(0); |