Skip to content

Instantly share code, notes, and snippets.

@kou1okada
kou1okada / fireworks.pde
Last active February 25, 2024 11:06
Fireworks for Processing
/**
* Fireworks for Processing
* Copyright (c) 2018 Koichi OKADA. All rights reserved;
* This code is distributed under the MIT license.
*/
int MaxLife = 255;
int N = 500;
class Fire {
@kou1okada
kou1okada / livedoorwiki_backup.sh
Last active September 4, 2023 00:37
backup script for livedoor wiki.
#!/usr/bin/env bash
# Copyright (c) 2013 Koichi OKADA. All rights reserved.
# This script is distributed under the MIT license.
# http://www.opensource.org/licenses/mit-license.php
SCRIPTNAME=${0##*/}
function usage ()
{
cat <<EOD
@kou1okada
kou1okada / calc_ddrescue_log.awk
Last active September 3, 2023 08:28
ddrescueutils
#!/usr/bin/gawk -f
BEGIN {
bad_sector = non_split = non_trimmed = finished = non_tried = 0;
}
$3 == "-" {bad_sector += strtonum($2);}
$3 == "/" {non_split += strtonum($2);}
$3 == "*" {non_trimmed += strtonum($2);}
$3 == "+" {finished += strtonum($2);}
$3 == "?" {non_tried += strtonum($2);}
@kou1okada
kou1okada / mbk2eml.rb
Created December 10, 2014 22:49
SoftBank Mail backup (.mbk) to .eml splitter
#!/usr/bin/env ruby
#
# mbk2eml.rb - mbk to eml splitter
#
# The .mbk file is the backup file of SoftBank Mail.
# This script splits .mbk file to .eml file.
# The .mbk files can be found from below directory.
# /storage/emulated/0/private/SBMAIL/MBK/
#
# SoftBank mail
@kou1okada
kou1okada / Ricty-4.0.1-1.cygport
Last active August 7, 2023 09:44
cygports - Cygwin ports
HOMEPAGE="http://www.rs.tus.ac.jp/yyusa/ricty.html"
SRC_URI="
https://github.com/google/fonts/raw/master/ofl/inconsolata/Inconsolata-Regular.ttf
https://github.com/google/fonts/raw/master/ofl/inconsolata/Inconsolata-Bold.ttf
https://osdn.jp/projects/mix-mplus-ipa/downloads/63545/migu-1m-20150712.zip
http://www.rs.tus.ac.jp/yyusa/ricty/ricty_generator-${PV}.sh
http://www.rs.tus.ac.jp/yyusa/ricty/os2version_reviser.sh
"
@kou1okada
kou1okada / __lsaconfig
Last active August 4, 2023 13:41
LSA (Local Security Authority) configration tool.
function dump_comp_stat () #
# Dump bash completion status.
{
local -a COMP_TYPE_DESC=(
[ 9]=" 9 # HT : normal completion"
[33]="33 # ! : listing alternatives on partial word completion"
[37]="37 # % : menu completion"
[63]="63 # ? : listing completions after successive tabs"
[64]="64 # @ : list completions if the word is not unmodified"
)
@kou1okada
kou1okada / README.md
Created June 2, 2023 11:25
shortcutfile_utils.bat - Utilities for the Windows Shortcut File

shortcutfile_utils.bat - Utilities for the Windows Shortcut File

Usage

Usage: SCF-GetFace.bat <ShortcutFile>
Usage: SCF-SetFace.bat <ShortcutFile> <FontFace>

Referenses

@kou1okada
kou1okada / README.md
Last active February 20, 2023 16:24
docker-lstags.sh - list tags for docker image

docker-lstags.sh - list tags for docker image

Usage

Usage: docker-lstags.sh [<namespace>/]<repository>

Requires

@kou1okada
kou1okada / pdfunbind.sh
Last active February 14, 2023 13:48
pdfunbindbook.sh - unbind a book that all pages are double-page except covers.
#!/usr/bin/env bash
#
# pdfunbind.sh - unbind double-page PDF.
# Copyright (c) 2018 Koichi OKADA. All rights reserved.
# This script is distributed under the MIT license.
#
# Reference:
# * [1] superuser / [Linux-based tool to chop PDFs into multiple pages [closed]](https://superuser.com/questions/191373/linux-based-tool-to-chop-pdfs-into-multiple-pages)
(( 5 <= DEBUG )) && set -x
@kou1okada
kou1okada / getappx.sh
Last active January 23, 2023 07:27
getappx - Get URLs of .appx files from Microsoft Store.
#!/usr/bin/env bash
# getappx - Get URLs of .appx files from Microsoft Store.
# Copyright 2020 (c) Koichi OKADA. All rights reserved.
# This script is destributed under the MIT license.
source hhs.bash 0.2.0
function fetch_post () # URL POSTDATA
{
local cachedir=/tmp/.cache