Skip to content

Instantly share code, notes, and snippets.

@koseki
koseki / jp-prefectures.html
Last active January 31, 2024 11:35
Japanese Prefectures 日本の都道府県 Text, JS, HTML 漢字, ローマ字, 都道府県コード
<select>
<option value="1">Hokkaido</option>
<option value="2">Aomori</option>
<option value="3">Iwate</option>
<option value="4">Miyagi</option>
<option value="5">Akita</option>
<option value="6">Yamagata</option>
<option value="7">Fukushima</option>
<option value="8">Ibaraki</option>
<option value="9">Tochigi</option>
@koseki
koseki / bingchat-ime-fix.user.js
Last active October 16, 2023 00:29
macOS の Edge で Bing chat を使うと日本語入力確定時に勝手に送信されてしまう問題に対応する userscript
// ==UserScript==
// @name Bing Chat IME fix
// @namespace https://gist.github.com/koseki/d377f8f2e6df6655a1e160a4e03421d1
// @version 0.4
// @description macOS の Edge で Bing chat を使うと日本語入力確定時に勝手に送信されてしまう問題の対応です
// @author koseki
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @match https://www.bing.com/*
// @grant none
// ==/UserScript==
@koseki
koseki / wp-lang.sh
Last active July 6, 2023 11:31
Download Wordpress translation files. Execute inside the wp-content/languages directory.
#! /bin/sh
#
# Download Wordpress translation files.
# Execute inside the wp-content/languages directory.
#
# http://codex.wordpress.org/Installing_WordPress_in_Your_Language
# http://ja.wordpress.org/install-ja/ (ja)
#
VERSION=3.5.x
@koseki
koseki / Gemfile
Last active June 16, 2023 06:55
WordNet 3.0 + Ruby (rwordnet)
source 'https://rubygems.org'
gem 'rwordnet'
@koseki
koseki / README.md
Last active April 29, 2023 09:13
Nginx: proxy_ignore_headers Set-Cookie is dangerous (vagrant-layout example)

Nginx proxy_ignore_headers example

This is configuration of vagrant-layout plugin. Based on php layout.

Nginx proxy_ignore_headers Set-Cookie; cache Cookies. The directive has irrelevant name, when using with Set-Cookie header. 💀

Installation

@koseki
koseki / generate.js
Created November 27, 2022 16:20
mv test
const fs = require('fs-extra');
async function main(size) {
for (let i = 0; i < 5; i++) {
console.log(i)
let s = '';
for (let j = 0; j < size; j++) {
s += i
}
await fs.outputFile(`${i}.txt`, s)
@koseki
koseki / excel-column-name.txt
Last active August 29, 2022 11:43
Excel Column Name 1 to 1000 Text (Copy & Paste instead of Autofill)
A
B
C
D
E
F
G
H
I
J
@koseki
koseki / MFARequiredForCurrentUsers.json
Last active August 4, 2022 10:41
MFA required IAM Policies
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowViewAccountInfo",
"Effect": "Allow",
"Action": [
"iam:GetAccountPasswordPolicy",
"iam:ListVirtualMFADevices"
],
@koseki
koseki / ISO639-1.txt
Last active February 1, 2022 21:41
ISO 639-1 Code => English Name text list / http://www.loc.gov/standards/iso639-2/ascii_8bits.html
aa Afar
ab Abkhazian
af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
an Aragonese
hy Armenian
as Assamese
@koseki
koseki / lscron
Created July 17, 2009 08:44
list all cron jobs.
#! /bin/sh
cat /var/spool/cron/* /etc/crontab | grep '^\(\*\|[0-9]\)' | sort -nk2 -nk1