Skip to content

Instantly share code, notes, and snippets.

View peco8's full-sized avatar
💭
Where's my Boy Bawang?

Toshiki Inami peco8

💭
Where's my Boy Bawang?
  • Rakuten, Inc
  • Tokyo
View GitHub Profile
@summerwind
summerwind / wireshark_and_http2_over_tls.md
Last active December 25, 2023 08:53
Wireshark で HTTP/2 over TLS の通信をダンプする方法

HTTP/2 over TLS の通信をダンプする方法

全体の流れ

  • 環境変数 SSLKEYLOGFILE に TLS の鍵をダンプするファイルを指定します
  • ブラウザを起動します
  • Wireshark や tshark に環境変数 SSLKEYLOGFILE に指定したファイルを設定します
  • ブラウザで HTTP/2 通信をおこないます
  • Wireshark や tshark で通信のダンプ内容を確認します
@kyohei-shimada
kyohei-shimada / ruby_memo.md
Last active February 27, 2020 06:27
RubyのちょっとしたTips

RubyのちょとしたTips

ちょっと便利なことだったり,今さら知った恥ずかしいことなど

ローカル変数のスコープ

小文字または`_'で始まる識別子はローカル変数また はメソッド呼び出しです。ローカル変数スコープ(クラス、モジュー ル、メソッド定義の本体)における小文字で始まる識別子への最初 の代入はそのスコープに属するローカル変数の宣言になります。宣 言されていない識別子の参照は引数の無いメソッド呼び出しとみな されます。 ローカル変数のスコープは、((宣言した位置から))その変数が宣 言されたブロック、メソッド定義、またはクラス/モジュール定義 の終りまでです。寿命もそのブロックの終りまで(トップレベルの ローカル変数はプログラムの終了まで)ですが、例外としてブロッ クが手続きオブジェクト化された場合は、そのオブジェクトが消滅 するまで存在します。同じスコープを参照する手続きオブジェクト 間ではローカル変数は共有されます。

@voluntas
voluntas / webrtc_stack.rst
Last active June 4, 2023 13:23
WebRTC スタックコトハジメ

WebRTC スタックコトハジメ

WebRTC スタックについて

@voluntas

バージョン

0.0.3

url

https://voluntas.github.io/

@sunaot
sunaot / hello_ruby.md
Last active April 4, 2017 11:04
さらっと読んで Ruby がわかった気になれるプログラミング言語 Ruby のかんたんな紹介
@rxaviers
rxaviers / gist:7360908
Last active April 26, 2024 15:35
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mwhite
mwhite / git-aliases.md
Last active April 22, 2024 09:22
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@kitak
kitak / doc.md
Last active October 18, 2023 09:57
コマンドによる「負荷」の原因切り分け

コマンドによる「負荷」の原因切り分け

この文章では、Linuxコマンド、sar, top, psを使って、一般的に負荷といわれるものの原因を切り分けることを目的とする。

そもそも負荷とは

「複数のタスクによるサーバリソースの奪い合いの結果に生じる待ち時間」を一言で表した言葉。OSのチューニングとは負荷の原因を知り、それを取り除くことにほかならない。

ボトルネックの見極め作業の大まかな流れ

  • ロードアベレージ(処理を実行したくても、実行できなくて待たされているプロセス(CPUの実行権限が与えられるのを待っている、またはディスクI/Oが完了するのを待っている)の数)を見る
@mikeda
mikeda / analyze_access_log.rb
Last active June 30, 2021 02:44
アクセスログ集計スクリプトのとりあえず版
#!/usr/local/bin/ruby
# アクセスログを1時間ごとに集計。アクセスタイプごとのアクセス数をTSV形式で出力する
# usage : analyze_access_log.rb <YYYYMMDD> <access_log>...
require 'json'
require 'time'
require 'pp'
ANALYZE_DATE = ARGV.shift # YYYYMMDD
@Huluk
Huluk / gist:5117702
Last active December 8, 2023 22:34
Open Files with Terminal Vim by default [mac, iterm]
If you want your terminal vim to open files you double click, follow the following steps (MacOS only):
1. Open Automator
2. Select Application
3. Copy the attached file
4. Save and set as default for opening files
Multiple files are opened in vim tabs.
If there is already a vim instance running, files are opened in it.
@leifg
leifg / Vagrantfile
Last active November 12, 2023 08:31
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end