Skip to content

Instantly share code, notes, and snippets.

View lo48576's full-sized avatar
✔️
activated

YOSHIOKA Takuma lo48576

✔️
activated
View GitHub Profile
wait-free/lock-free/obstruction-freeの定義について
▲全てに共通する概念
スレッドが他のスレッドの進行を禁止する事がないので、どれかのスレッドが
ロックを確保したままプリエンプションなどで全体の処理が停止する事態が発生しな
い。
これは必ずしもロックベースのアルゴリズムより高速であることを意味し
ない(現にロックの方が早い場合もある
wait-freeが一番強い条件で、それを弱める度に
@tosihisa
tosihisa / gcc_warn_query.awk
Created May 3, 2012 12:47
gcc の警告オプションを調べてみた。
#!/usr/bin/gawk -f
#http://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html
BEGIN {
gcc_cmd="gcc -Q --help=warnings,^joined,^undocumented";
w_lv[0] = "";
w_lv[1] = "-Wall";
w_lv[2] = "-Wall -Wextra";
for(i = 0;i < 3;i++){
cmdln = sprintf("%s %s",gcc_cmd,w_lv[i]);
@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

The B, C, K, W system is a variant of combinatory logic that takes as primitive the combinators B, C, K, and W.
BCKWシステムとは、B、C、K、Wの四つの組み込みコンビネータを持つコンビネータ算法の一種である。
This system was discovered by Haskell Curry in his doctoral thesis Grundlagen der kombinatorischen Logik, whose results are set out in Curry (1930).
このシステムは、ハスケル・カリーによって
The combinators are defined as follows:
四つのコンビネータは以下のように定義される。
B x y z = x (y z)
C x y z = x z y
K x y = x
W x y = x y y
@mala
mala / gist:5108900
Created March 7, 2013 15:38
攻撃者が生パスワードまず復元できないだろという状況でも全ユーザーのパスワードリセットしたほうが良い10の理由

Evernoteの話ですけど。「強固なパスワード暗号化技術を採用」していて、攻撃者がまず生パスワード復元できないだろう、という状況であっても、パスワードリセットはしたほうがいい。

2011年のLastpassのケースでは、強固なパスワード使っている人は大丈夫だけど、そうじゃない場合はブルートフォースでマスターパスワード取得されうるということを発表していた。これはハッシュ値生成のアルゴリズムが、既知 or 推測しやすい or ソースコードも含めて漏洩している、という時にこの状態になる。

"If you have a strong, non-dictionary based password or pass phrase, this shouldn't impact you - the potential threat here is brute forcing your master password using dictionary words, then going to LastPass with that password to get your data. Unfortunately not everyone picks a master password that's immune to brute forcing."

で、Evernoteのケースは「弊社は強固なパスワード暗号化技術を採用しておりますが」と言っている。

@shiwano
shiwano / vimgirl.txt
Last active April 25, 2017 06:55
Vim Girl の AA。 等幅。M+フォントかM+フォント合成フォントでの閲覧推奨。
メ __-─-,-- _
,イ >:::::::::::< ヽ〟
ヽ─イ /,::::,::::::::\ >─r
ヾ〟//:!:::ハ::::::|:!:ヽ ,丿
ソ r:リヤ ハ::::::ハ:ハ::|rヘ〟
Ⅲ:|:| V―ヘ::::/-ル゙|/ ハリ\ あらぶる
!|:ハ:|,-=〟ヽ/,-=.ソハリ H Vim の
!ヽriゾUソゾ "ハUソノ゙hNノソ ぽーず♡
|!ハヾヾ` `´ノlリ´
ノ:ノハ ハ 丶 クハ ____
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@denisdefreyne
denisdefreyne / nanoc-asciidoctor-preprocessor.rb
Created February 17, 2014 20:52
Preprocessor that extract AsciiDoc (Asciidoctor) metadata
preprocess do
@items.each do |item|
case item[:extension]
when 'adoc', 'asciidoc'
Asciidoctor::Document.new(item.raw_content).attributes.each_pair do |k,v|
item[k.to_sym] = v
end
end
end
end
@moschlar
moschlar / make.conf
Last active February 5, 2024 10:00
Run Gentoo Portage in a cpu cgroup
PORTAGE_IONICE_COMMAND="/usr/local/sbin/portage-cgroup \${PID}"
anonymous
anonymous / gist:d8070631a6dea8ad604f
Created February 20, 2016 07:57
ソルダーガールズ
初めての学園祭に向けて
花の落ちてしまった桜、まだ制服に着られている新入生―
桜木学園、そこでの毎年の、もう私にとっては5回目の光景。
私は、北陽翔子(ほくようしょうこ)。つい一ヶ月前に高校2年生になったばかり。
仄かにヤニの匂いのする部室ではぁ、とため息を一つ吐く。
もちろんタバコなんて吸わない。はんだに含まれているヤニの匂いだ。
なんと言っても私は物理部の副部長。