Skip to content

Instantly share code, notes, and snippets.

View master-q's full-sized avatar
🌴
On vacation

Kiwamu Okabe master-q

🌴
On vacation
View GitHub Profile
@jboner
jboner / latency.txt
Last active June 2, 2024 14:49
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
@laurenarcher
laurenarcher / livestreamingyoutube
Created November 21, 2014 14:13
Livestreaming to Youtube Live, Ubuntu, Linux FFMPEG
Terminal Commands:
One webcam:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
Two webcam overlay:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -f v4l2 -s 320x240 -r 10 -i /dev/video0 -filter_complex "[1:v]setpts=PTS-STARTPTS[bg]; [2:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=shortest=1 [out]" -map "[out]" -map 0:a -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
@matsubara0507
matsubara0507 / makeSlideUsingMarkdown.md
Last active November 26, 2019 04:43
Pandoc + reveal.jsでMarkdownによるスライド作成 in Windows

Pandoc + reveal.jsでMarkdownによるスライド作成

概要

Pandoc + reveal.jsでMarkdownによるスライド作成をWindowsで行えるようにするまでの環境づくりの手順。
と、イロイロといじったのでそれをメモしておく。

いきさつ

Markdownでサクッとスライドが作れるといいなーと思って昨年ぐらいより Pandoc + reveal.js を使い始めた。
PCを新しくしたついでに環境をイロイロ整え直したので、それをメモしておこーかなと。

@lightrush
lightrush / README.md
Last active September 2, 2023 22:57
Normalize volume level with PulseAudio

Normalize volume level with PulseAudio and simultaneous output

This should work conceptually on any Linux OS with PulseAudio but these particular instructions are for Ubuntu. There are two major reasons for using simultaneous output. The first is self-evident - we can output to say a bluetooth headset and wired headphones at the same time to enable two people to watch a movie with headphones on a single computer. The second reason is a sort of a convenience for setup. We know the simultaneous sink name so the default.pa config would work without modification so long as simultaneous output is enabled. If we were to set this up without that, we'd have to customize the config with our specific device sink name. That's totally doable but personally I always setup simultaneous output. That's why I haven't described the alternative in this gist.

NFTって何?

人々の無理解にもとづく投資ビジネス。

ブロックチェーンとは何か

  • 全世界で共有しているgitリポジトリのようなもの。
  • 「誰が何を誰に渡した」という履歴が記録される。
  • Gitとの違い:
  • commitするのに手数料が必要。
@kazuho
kazuho / quest3-termux.md
Last active May 26, 2024 09:17
Meta Quest 3のlinuxセットアップ

想定読者

  • linuxに関する基本的な知識があるソフトウェアエンジニアもしくはヘビーユーザで、Quest 3のlinuxをGUI環境で使いたい人
  • apkのインストールとか説明しませんが、Quest 3に入れたやつは、アプリ一覧からカテゴリでUntrusted Sourcesみたいなのを選ぶと出てきます
  • termuxの上にlinux distroを載せるのは、遅いのでやりません(下記ベンチマーク参照)。prefixed-rootだろうがシングルユーザだろうがmusl libcだろうが我々なら大丈夫だ!
  • linuxアプリのインストールは特記事項ない限り省略します。勝手にpkg installとかして

ベンチマーク