Skip to content

Instantly share code, notes, and snippets.

View jj1bdx's full-sized avatar
🏠
Working from home

Kenji Rikitake jj1bdx

🏠
Working from home
View GitHub Profile
@endolith
endolith / readme.md
Last active April 3, 2024 18:31
THD+N calculator

Unfortunately, there are 2 versions of this. The other is here: https://github.com/endolith/waveform-analyzer I intend to either completely combine them or completely separate them, eventually.

Somewhat crude THD+N calculator in Python

Measures the total harmonic distortion plus noise (THD+N) for a given input signal, by guessing the fundamental frequency (finding the peak in the FFT), and notching it out in the frequency domain. This is a THDR

-module(mnesia_repl_and_frag).
-compile([export_all]).
-record(store, {key, value}).
%% Usage:
%% Start secondary node, at first. Not a typo :-)
%% Then start primary at another node.
@netj
netj / csv2tsv.py
Created August 16, 2010 14:38
CSV to TSV python one-liner
#!/usr/bin/env python
import sys,csv
for row in csv.reader(sys.stdin):
print "\t".join(row)
@perusio
perusio / gist:1154002
Created August 18, 2011 12:54
My ~/.config/lxterminal/lxterminal.conf with solarized colors
[general]
fontname=Terminus 9
selchars=-A-Za-z0-9,./?%&#:_
scrollback=0
bgcolor=#00002b2b3636
bgalpha=65535
fgcolor=#65657b7b8383
disallowbold=false
cursorblinks=false
cursorunderline=false
@endolith
endolith / LICENSE.txt
Last active January 14, 2024 07:37
Arduino hardware true random number generator
MIT License
Copyright (c) 2012 endolith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@matope
matope / Dynamo: Amazonの高可用性Key-value Store.markdown
Last active November 18, 2022 17:54
Dynamo: Amazonの高可用性Key-value Store[和訳]
@jboner
jboner / latency.txt
Last active May 1, 2024 14:21
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@ymotongpoo
ymotongpoo / erlang_ja_en.txt
Last active October 5, 2015 18:47
Erlang関連 訳語表
オリジナルは力武さんの投稿 http://erlang-users.jp/ml/erlang/index.cgi?0::166
アキュムレータ accumulator
アノテーション annotation
アリティ arity
ー致条件 match specification
入れ子リスト deep list
インターフェイス interface
エクスポート export
@bsparrow435
bsparrow435 / gist:3563993
Created September 1, 2012 04:44
Riak MDC cheat sheet

#Riak Multi DC Repl Cheat Sheet


##Types There are two types of multi data center replication in Riak.

  1. Fullsync

    Operation is triggered by connection creation between clusters, running riak-repl start-fullsync on the listener leader, or every fullsync_interval minutes. Relevant app.config settings: