Skip to content

Instantly share code, notes, and snippets.

@eidantoei
eidantoei / karabiner-elements-cmd-to-eisuukana.json
Created August 3, 2019 07:51
Karabiner-Elements Complex Modifications: Change Command Key to EISUU/KANA
{
"title": "Change Command Key to EISUU/KANA",
"rules": [
{
"description": "Post EISUU/KANA if Command_L/Command_R is pressed alone.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_command",
@eidantoei
eidantoei / tabelog.ts.sh
Created November 3, 2017 15:28
食べログトップページの検索フォームの裏で流れる会食している人たちのムービーを全部通しで見る
curl -s 'https://tabelog-video.k-img.com/movies/rsttop/20170302/rsttop_movie_stream-[000-080].ts' >> tabelog.ts
open tabelog.ts
@eidantoei
eidantoei / skypeemoticon2gif.sh
Last active August 12, 2016 08:24
Conert Skype sprite emoticon file to Animated GIF (e.g. /Applications/Skype.app/Contents/Resources/[email protected])
#!/bin/bash
set -eo
SRC_FILE=$1
SRC_WIDTH=$(echo $(identify -format "%w" ${SRC_FILE}))
SRC_HEIGHT=$(echo $(identify -format "%h" ${SRC_FILE}))
FRAMES=$(echo "${SRC_HEIGHT}/${SRC_WIDTH}-1" | bc)
for i in $(seq 0 ${FRAMES})
http://zinesmate.org/lang/jp/exhibitors/artbyte_2014
http://zinesmate.org/lang/jp/exhibitors/aihara-chigusa_2014
http://zinesmate.org/lang/jp/exhibitors/einstein-stu_2014
http://zinesmate.org/lang/jp/exhibitors/mana-aoyama_2014
http://zinesmate.org/lang/jp/exhibitors/akaaka-art-publishing-inc_2014
http://zinesmate.org/lang/jp/exhibitors/akimoto-tsukue_2014
http://zinesmate.org/lang/jp/exhibitors/ashitano-bookstore_2014
http://zinesmate.org/lang/jp/exhibitors/adachi-yumika_2014
http://zinesmate.org/lang/jp/exhibitors/abe%e3%80%80ryuichi_2014
http://zinesmate.org/lang/jp/exhibitors/chihiro-iseya_2014
@eidantoei
eidantoei / instagram_replace_photo_to_img.bookmarklet.js
Created March 11, 2014 16:22
Instagram: replace photo to img tag
var imgElm=document.createElement('img');imgElm.style.width='100%';imgElm.src=document.getElementsByClassName('Image')[0].style.backgroundImage.replace(/url\((.*)\)/,"$1");document.querySelectorAll('.iMedia')[0].insertBefore(imgElm);var gomiElm = document.querySelectorAll('.iWithTransition')[0];gomiElm.parentNode.removeChild(gomiElm);
<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns='http://www.opengis.net/kml/2.2'>
<Document>
<name>2013-10-12 赤瀬達三「サインシステム計画学」所蔵館</name>
<description><![CDATA[]]></description>
<Folder>
<name>東京都</name>
<Placemark>
<styleUrl>#icon-seq-0-0</styleUrl>
<name>北区立滝野川図書館</name>
@eidantoei
eidantoei / gist:5401670
Last active December 16, 2015 07:49
手短に指定文字を指定回数出力する
n=1000;s=-;xargs -i printf $s<<<"`seq $n`";echo
@eidantoei
eidantoei / Usage
Created October 8, 2012 19:17
Generate GIF animation randomly
$ ls -1 ??.jpg
10.jpg
12.jpg
14.jpg
16.jpg
18.jpg
20.jpg
22.jpg
24.jpg
26.jpg
@eidantoei
eidantoei / nagios-log-readable.sh
Created September 4, 2012 09:46
Nagios Log Readable
#!/bin/bash
# Naigos Log Readable
# usage: ``$ tail /usr/local/nagios/var/nagios.log | /usr/local/nagiosutils/nagios-log-readable``
while read L
do
M=$(cut -f2- -d" "<<<"${L}")
T=$(cut -f1 -d" " <<<"${L}" | tr -d '[]' | awk '{print strftime("%F-%T",$1)}')
echo "[${T}] ${M}"
done
@eidantoei
eidantoei / nrpe_check_all.oneliner.sh
Created August 1, 2012 09:24
Run all NRPE commands in nrpe.cfg
grep '^command\[' /etc/nagios/nrpe.cfg | while read l; do n=$(cut -f2 -d'['<<<"$l"|cut -f1 -d']'); c=$(cut -f2- -d'='<<<"$l"); r=$(bash <<<"$c"); case $? in 0) echo -ne "\033[42m\033[1;37m OK \033[0m";; 1) echo -ne "\033[43m\033[1;37m WARN \033[0m";; 2) echo -ne "\033[41m\033[1;37m CRIT \033[0m";; *) echo -ne "\033[45m\033[1;37m UNKN \033[0m";; esac; echo -ne " \033[4m$n\033[0m $c\n$r\n\n"; done