Skip to content

Instantly share code, notes, and snippets.

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

Yoshiaki Ueda (bootjp) bootjp

🏠
Working from home
View GitHub Profile
@iwasa-kosui
iwasa-kosui / how-you-will-be-billed-with-big-query.user.js
Last active August 29, 2024 02:43
BigQuery での課金額を表示する UserScript
// ==UserScript==
// @name How you will be billied with BigQuery
// @version 0.1
// @description BigQuery での課金額を表示します
// @author Kosui Iwasa
// @match https://console.cloud.google.com/bigquery*
// @icon https://www.google.com/s2/favicons?domain=google.com
// @grant none
// ==/UserScript==

yjit についてメモ書き

めちゃ速い

$ for opt in '' '--jit' '--yjit'; do echo "opt": $opt; time ./miniruby $opt -e 'def fib(n); return n if n < 2; fib(n - 1) + fib(n-2); end; fib(35)'; done
opt:
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active October 4, 2025 08:06
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@Flova
Flova / nginx_dump.sh
Last active February 16, 2024 11:22
Creates a memory dump of a running nginx. Usefull for getting lost config files from a running machine.
# Get the process id of nginx
NGINX_PID=$(pgrep -o 'nginx')
echo Nginx server PID: $NGINX_PID
# Get the memory parts that are used by nginx.
# That make gdb dump commands with it and dump the corresponding memory into files
cat /proc/$NGINX_PID/maps \
| awk '
$6 !~ "^/" {split ($1,address,"-");
print "dump memory mem_" address[1] " 0x" address[1] " 0x" address[2] ;}
@wktk
wktk / humanity-solver.user.js
Last active December 21, 2023 08:04
はてラボ人間性センター自動入力
// ==UserScript==
// @name Humanity Solver
// @version 1
// @grant none
// @include http://human.hatelabo.jp/quiz?*
// @include https://human.hatelabo.jp/quiz?*
// ==/UserScript==
// 下記URLを参考に過不足分を補正したもの
// https://web.archive.org/web/20210104141218/https://anond.hatelabo.jp/20210104230501
@site0801
site0801 / nested対応してるクラウド事業者リスト.md
Last active March 2, 2024 09:11
nested対応してるクラウド事業者リスト

nested対応してるクラウド事業者リスト

これはなにか

各クラウド事業者のサービス(VPS)でKVMなどを動かす際に仮想化支援機構がサポートされているかどうかをまとめたものです。
また、本記事はVPS事業者が仮想化支援機構をサポートしたインスタンスを提供しているかどうかで優劣をつけるための目的で記述されているものではなく、利用者がKVMをVPS上で利用したい場合に困らないようにするのが目的です。

調べ方は以下のコマンドで調べる。
egrep -c '(vmx|svm)' /proc/cpuinfo
------------------------------ココより下は随時更新されます。------------------------------

AWS

EC2

pub trait CA<T> {
fn rule(&self, x: usize, y: usize) -> T;
fn update(&mut self) -> ();
fn render(&self) -> String;
}
mod lifegame {
#[derive(Copy, Clone, PartialEq)]
pub enum CellStatus {
Dead,
@naoty
naoty / hatena2md.rb
Last active May 2, 2021 12:28
はてなブログからエクスポートしたMT形式のファイルをMarkdownファイルに分割するやつ
require "bundler/inline"
require "pathname"
require "time"
require "uri"
abort "[USAGE]: hatena2md <exported file> <output dir>" if ARGV.length < 2
exported_file_path = ARGV[0]
output_dir = Pathname.new(ARGV[1])
output_dir.mkpath unless output_dir.exist?
@27Cobalter
27Cobalter / Unlit_Alpha_Trans_hide.shader
Last active October 27, 2022 04:22
KawaiiCameraをカメラで映らなくするシェーダ+最前面表示
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Unlit alpha-blended shader.
// - no lighting
// - no lightmap support
// - no per-material color
Shader "Custom/Unlit_Alpha_Trans_hide" {