Skip to content

Instantly share code, notes, and snippets.

View masutaka's full-sized avatar

Takashi Masuda masutaka

View GitHub Profile
@ahmetb
ahmetb / gcrgc.sh
Last active February 26, 2024 09:14
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@masutaka
masutaka / rbenv-ruby.md
Last active February 18, 2024 13:32
【決定版】rbenv を使った ruby のインストール

rbenv および Ruby-2.5.0 のクリーンインストール

  1. Homebrew の rbenv や ruby-build をインストールしていたら、もろもろ削除する

    $ brew uninstall --force rbenv ruby-build
    $ rm -rf ~/.rbenv
    
  2. rbenv をインストールする

@wonda-tea-coffee
wonda-tea-coffee / reported_vulnerabilities.md
Last active January 12, 2024 03:08
報告した脆弱性のうち公開できるもの
@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
@nottrobin
nottrobin / nginx-sigquit.Dockerfile
Created November 15, 2019 11:48
nginx should use STOPSIGNAL SIGQUIT
FROM nginx
RUN echo 'server {\n\
listen 80 default_server;\n\
location / {\n\
proxy_pass http://httpbin.org/delay/10;\n\
}\n\
}' > /etc/nginx/conf.d/default.conf
STOPSIGNAL SIGQUIT
@sue445
sue445 / equal_with_indifferent_access.rb
Last active February 10, 2023 14:29
[RSpec custom matcher] match hashes with indifferent access
# match hashes with indifferent access
#
# example)
# expect({"key1" => 1, :key2 => 2}).to equal_with_indifferent_access(key1: 1, key2: 2)
RSpec::Matchers.define :equal_with_indifferent_access do |expected|
match do |actual|
actual.with_indifferent_access == expected.with_indifferent_access
end
@jamesls
jamesls / alias
Last active January 15, 2023 21:52
AWS CLI v2 upgrade aliases.
[toplevel]
# Put this in ~/.aws/cli/alias
# and you'll have an "aws upgrade"
# and an "aws check-upgrade" command.
#
# Only works on macOS and installs using
# the .pkg installer.
#
upgrade = !f() {
curl -s "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "/tmp/AWSCLIV2.pkg"

https://zverok.space/blog/2022-03-03-WAR.html 翻訳

ハリコフのRubyistからRubyコミュニティへのお願い

2022年3月3日

やぁ、僕はVictor Shepelev。ウクライナのハリコフに住んでいて、TwitterGitHubでは@zverokというIDで活動している。

僕がRubyを書き始めたのは2003年からで、いくつかのライブラリやRuby Changelogのメンテナだ。国際的なカンファレンスや/r/rubyなんかで君たちと会ったことがあるかも知れない。今年、僕はRubyコミッターに申請して、嬉しいことに承認された。僕が取り組んでいるのは(いくつかの小さな機能追加と共に)Rubyドキュメントの改善だ。僕のRubyに関する作業の一覧はここで確認できる

anonymous
anonymous / emacs24_3_inline_memleak.sh
Created January 22, 2014 04:06
emacs 24.3でdistnotedを暴走させないパッチ+inlineパッチのビルド手順です。sakito.jpの手順を修正したものです。
EMACS_VER=24.3
curl -O http://ftp.gnu.org/pub/gnu/emacs/emacs-${EMACS_VER}.tar.gz
curl -O https://gist.github.com/anonymous/8553178/raw/c0ddb67b6e92da35a815d3465c633e036df1a105/emacs.memory.leak.aka.distnoted.patch.diff
svn co http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk inline_patch
tar xvfz emacs-${EMACS_VER}.tar.gz
cd emacs-${EMACS_VER}
@azu
azu / git-2.26.1-README.md
Last active January 22, 2022 21:54
Gitの認証情報を奪い取れるGit 2.26.0以下にある脆弱性について

Git 2.26.0以下にある脆弱性

Git 2.26.0以下*1には、細工したリポジトリをgit cloneしたときに、 そのユーザーのCredential(たとえばGitHub.comをcloneするときに使う認証情報)を奪い取れる脆弱性があります。

📝 取得できる認証情報は credential.helper の設定に依存する

既にPoC(検証するためのコード)もあり、結構簡単なので是非Gitを2.26.1以上にアップデートしましょう。 git submoduleを使うと見た目ではわかりにくい攻撃もできるので、「気をつける」では回避は難しいです。