Skip to content

Instantly share code, notes, and snippets.

View yukirii's full-sized avatar
✈️

Yuki Kirii yukirii

✈️
View GitHub Profile
provider "azurerm" {
features {
key_vault {
recover_soft_deleted_key_vaults = false
purge_soft_delete_on_destroy = false
purge_soft_deleted_keys_on_destroy = false
}
}
}
@yukirii
yukirii / hpe_sos_ubuntu.md
Last active August 31, 2024 22:28
installing HPE StoreOpen Software for RHELx64 to Ubuntu 20.04.2 LTS (Reference: https://rabbit-note.com/2020/01/12/ubuntu-ltfs/)
@yukirii
yukirii / awesome-tool.rb
Last active December 6, 2020 01:08
バイナリの取得に失敗した場合にメッセージを表示する Homebrew Formula https://blog.yukirii.dev/customize-homebrew-download-strategy/
class AwesomeToolDownloadStrategy < CurlDownloadStrategy
def fetch
super
rescue CurlDownloadStrategyError => e
opoo <<EOL
awesome-tool のインストールは VPN に接続されている状態で実行する必要があります。
Download に失敗した場合 VPN に接続されているか確認してください。
EOL
raise e
end
@yukirii
yukirii / id3conv.py
Created December 3, 2017 13:16 — forked from abicky/id3conv.py
convert ID3 tags of MP3 files from Latin-1 to UTF-16
#!/usr/bin/env python
# -* - coding: utf-8 -*-
import argparse
import inspect
import eyed3
import eyed3.id3
def convertID3Encoding(audiofile, backup = False):
tag = audiofile.tag
if not tag:
on isRunning(appName)
tell application "Finder" to activate
tell application "System Events" to tell process "Finder" to (name of windows) contains appName
end isRunning
on closeDialog(appName)
tell application "System Events"
tell process "Finder"
click button "OK" of window appName
end tell
@yukirii
yukirii / lsyncd.lua
Last active December 20, 2016 14:12
CyberAgent Developers Advent Calendar 2016 - https://developers.cyberagent.co.jp/blog/archives/3572/
--
-- Lua の HTTP module を使用しているため lua-socket パッケージが必要
--
http = require("socket.http")
ltn12 = require("ltn12")
--
-- cache サーバの一覧
--
varnishHosts = {
#!/bin/bash
# conf
FILENAME=/data/testfile
SIZE=512M
RUNTIME=60
SLEEPTIME=10
# exec
#for NUMJOB in 1 2 4 8 16 32 64 128 256; do
@yukirii
yukirii / cpuinfo.md
Created September 8, 2016 03:59
EC2 m4.10xlarge
[ec2-user@ip-xxx-xx-xx-xxx ~]$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 63
model name      : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
stepping        : 2
microcode       : 0x25
cpu MHz         : 1447.125
@yukirii
yukirii / mqtt_subscriber_example.rb
Created August 14, 2016 07:59
mqtt_subscriber_example
require 'mqtt'
require 'json'
HOST = '192.168.x.x'
PORT = 1883
MQTT::Client.connect(remote_host: HOST, remote_port: PORT, username: 'test', password: 'test') do |client|
client.get('test') do |topic, message|
data = JSON.parse(message)
puts "#{topic}: #{data}.class = #{data.class}"