Skip to content

Instantly share code, notes, and snippets.

View curipha's full-sized avatar
🕊️
Pray for peace

OKAMOTO Taichi curipha

🕊️
Pray for peace
  • Kyoto, Japan
  • 07:31 (UTC +09:00)
View GitHub Profile
@curipha
curipha / config.properties
Created March 19, 2024 06:25
k8s - check behavior of configMap
TEST=123
FOO=bar
hoge=FUGA
@curipha
curipha / deployment.yaml
Created January 3, 2023 05:51
K8s - configMapGenerator with ArgoCD
apiVersion: apps/v1
kind: Deployment
metadata:
name: ubuntu
spec:
replicas: 2
selector:
matchLabels:
app: ubuntu
template:
# _ _ 2020.-1.26
# | |_| |_ __ _ __ __ ___ ______
# _| ' \ _/ _` / _/ _/ -_|_-<_-<
# (_)_||_\__\__,_\__\__\___/__/__/
# Apache preferences
# ------------------
AddDefaultCharset UTF-8
DirectoryIndex index.html .forbidden
@curipha
curipha / Excel Customizations.exportedUI
Created June 1, 2022 11:42
Microsoft Office Exported UI Customization
<mso:cmd app="Excel" dt="1" />
<mso:customUI xmlns:msox="http://schemas.microsoft.com/office/2006/01/customui/special" xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
<mso:ribbon>
<mso:qat>
<mso:sharedControls>
<mso:control idQ="mso:ReadOnly" visible="true"/>
<mso:control idQ="mso:Filter" visible="true"/>
<mso:control idQ="mso:SortClear" visible="true"/>
<mso:control idQ="mso:FilterReapply" visible="true"/>
<mso:control idQ="mso:InsertPivotTableDropdown" visible="true"/>
#!/usr/bin/env ruby
# a1 : [ int, int, ... ]
# a2 : [ int, int, ... ]
def merge(a1, a2 = nil)
return a1 if a2.nil?
r = []
loop do
case

OSのインストール後にソフトウェアRAIDをセットアップする

1台のHDDにCentOSをインストールしたシステムを,あとからソフトウェアRAIDにする時の作業メモです. LVM+ext3の少し古い環境を想定していますが,LVM+XFSでもだいたい同じはずです.

ポイントは

  • OSインストールしてから,あとでソフトウェアRAID
  • RAIDのレベルはRAID1(ミラーリング)
@curipha
curipha / jrdelay.py
Created October 31, 2021 12:32
Send a Teams Webhook when JR 京都線 is delayed
#!/usr/bin/env python3
# coding: utf-8
import json
from urllib import request,parse
from lxml import html
WEBHOOK = 'https://127.1.1.1/' # Put your webhook endpoint here
@curipha
curipha / bingwall2.py
Last active October 31, 2021 12:23
Mass downloader for bing wallpaper
#!/usr/bin/env python3
import hashlib
import json
import os
from urllib import request,parse
TARGET_DIR = './bing/'
BING_URI_FORMAT = 'https://www.bing.com/HPImageArchive.aspx?format=js&idx={}&n=8&mkt={}' # n > 8 is ignored
LOCALE = {
@curipha
curipha / bingwall.py
Created October 24, 2021 06:09
Download bing wallpaper
#!/usr/bin/env python3
import json
import hashlib
from urllib import request,parse
BING_URI = 'https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1'
req = request.urlopen(BING_URI)
bing = json.loads(req.read())
@curipha
curipha / boinc.yml
Last active September 14, 2022 15:53
cloud-config file for BOINC client
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: false
packages:
- boinc-client
locale: en_US.UTF-8
timezone: Asia/Tokyo