Skip to content

Instantly share code, notes, and snippets.

@y13i
y13i / ruby_aws_sdk_credentials.md
Last active July 4, 2022 05:32
Rubyとaws-sdkとcredentials

前書き

AWS SDKを使ったアプリケーションを作る時credentialsの扱いがいつも面倒なので、ベストプラクティス的なものを考えていきたい。

例として、

$ ruby myec2.rb list
@sonots
sonots / fluentd_hacking_guide.md
Last active October 4, 2024 00:01
Fluentd ソースコード完全解説 (v0.10向け)

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ
@na-o-ys
na-o-ys / rsa.rb
Last active August 29, 2015 14:10
handcrafted rsa
require './rsa_math.rb'
class RSA
class << self
PUBLIC_EXPONENT = 65537
def gen_key(bits)
e = PUBLIC_EXPONENT
p = RSAMath.gen_prime(bits/2)

移動しました

Embulk

Embulkってなに?ということから、Embulkのプラグインを開発するところまでをまとめたページです。

Embulkとは

@hiroyuki-sato
hiroyuki-sato / gist:61e5da934ccf41a258ca
Created February 24, 2015 10:04
Embulk epoch timestamp test.
[1] pry(main)> Time.at(1424770450)
=> 2015-02-24 18:34:10 +0900
% cat hoge_01.csv 
192.168.10.143,192.168.10.53,1424770450
@JonathanBennett
JonathanBennett / gist:ea8fcf1b23cefef66869
Created April 22, 2015 12:57
Connect Tableau to Presto through Prestogres bridge through custom TDC.
<?xml version='1.0' encoding='utf-8' ?>
<connection-customization class='postgres' enabled='true' version='7.7'>
<vendor name='postgres' />
<driver name='postgres' />
<customizations>
<!-- Keep using the PostgreSQL driver for the Tableau PostgreSQL connection, but override settings that the remote Presto server does not support. -->
<customization name='odbc-connect-string-extras' value='UseDeclareFetch=0;UseServerSidePrepare=0' />
<customization name='CAP_CREATE_TEMP_TABLES' value='No' />
<customization name='CAP_SELECT_INTO' value='No' />
</customizations>
@sile
sile / 0_raft.md
Last active May 31, 2026 15:49
Raft(分散合意アルゴリズム)について
@yuroyoro
yuroyoro / Uber-migrated-pg-to-mysql.md
Created July 27, 2016 06:28
UberのPostgresqlからNoSQL on MySQLへの移行を読んでざっくりまとめた

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の不整合が起きる