Skip to content

Instantly share code, notes, and snippets.

知識、スキル クライアント、企画、営業 ウェブ ディレクター ウェブ デザイナー フロントエンド エンジニア バックエンド エンジニア システム保守、 運用
企画 課題発見 アンケート調査、インタビュー、SEO
ビジョン設定、 コンセプト立案 課題発見、概念図作成、ワークショップ、ファシリテーション
@tokiwatch
tokiwatch / rec_radiko.sh
Created April 12, 2021 04:46 — forked from matchy256/rec_radiko.sh
簡易Radiko録音スクリプト
#!/bin/bash
LANG=ja_JP.utf8
pid=$$
date=`date '+%Y-%m-%d-%H_%M'`
outdir="."
if [ $# -le 1 ]; then
@tokiwatch
tokiwatch / rec_nhk.sh
Created April 12, 2021 04:46 — forked from matchy256/rec_nhk.sh
簡易らじるらじる(NHK)録音スクリプト (2017/09 以降版)
#!/bin/bash
pid=$$
date=`date '+%Y-%m-%d-%H_%M'`
outdir="."
if [ $# -le 1 ]; then
echo "usage : $0 channel_name duration(minuites) [outputdir] [prefix]"
exit 1
fi
@tokiwatch
tokiwatch / blogger2octopress.pl
Last active July 6, 2016 07:41
convert blogger backup file to octopress style entry files.
## -*- mode: perl; coding: utf-8 -*-
# blogger2octopress.pl
# Author: Takuji Tokiwa
#
# About:
# Export entries from blogger backup file to octpress format entries.
#
# Usage:
# 1. Install XML::Simpe, DateTime::Format::ISO8601 and HTML::WikiConverter::Markdown via cpan, cpanm or 'Carton Install'.
@tokiwatch
tokiwatch / fix_doubleencode.sh
Last active August 29, 2015 14:08
Fix double encoded database.
### このシェルスクリプトは、Latin1のテーブルにUTF8でコンテンツが書き込まれてしまったデータベースを修復します。
my_db='dbname';
my_user='dbuser';
my_pw='dbpassword';
for my_table in $(mysql -u$my_user -p$my_pw -N -s -r $my_db -e 'show tables;'); do
for my_column in $(mysql -u$my_user -p$my_pw -N -r -s -e "use $my_db; show columns from $my_table" | cut -f1); do
echo $my_column;
mysql -u$my_user -p$my_pw -N -r -s -e "use $my_db; UPDATE $my_table SET $my_column = CONVERT(CAST(CONVERT($my_column USING latin1) AS BINARY) USING utf8);"