This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -name "*.flac" | while read f; do ffmpeg -i "$f" -vsync 0 -c:v png -c:a alac "${f%.flac}.m4a"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Preparation: Please install jq with homebrew | |
# API Reference: https://developer.nature.global/ | |
# Get token from https://home.nature.global/ | |
token="${NatureAPIToken}" | |
# Get id from `GET /1/appliances` API | |
# https://swagger.nature.global/ | |
appliancesId="${NatureRemoEApplianceId}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from(document.querySelectorAll('.markdown-body details')).forEach((obj, idx) => { obj.open = true; }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in `\find . -maxdepth 2 -name '*.png'`; do | |
convert $file -quality 90 ${file%.*}.jpg | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.forEach.call(document.querySelectorAll('.someClass'), function(node) { | |
console.log(node) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Reference: https://www.raspberrypi.org/forums/viewtopic.php?t=72435 | |
# https://stackoverflow.com/questions/3211595/renaming-files-in-a-folder-to-sequential-numbers | |
ls -l *.jpg | awk '{print $NF}' | gawk 'BEGIN{ a=1 }{ printf "mv %s %06d.jpg\n", $0, a++ }' | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILENAME=$1 | |
if [ ! -n "${FILENAME}" ]; then | |
echo "Please specify input file" | |
exit 1 | |
fi | |
ffmpeg -y -i ${FILENAME} -preset slower -c:v libx264 -b:v 320k -pass 1 -an -f mp4 /dev/null && ffmpeg -y -i ${FILENAME} -c:v libx264 -preset slower -b:v 320k -pass 2 -an "${FILENAME%.*}.mp4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# <bitbar.title>ChatWork unread count check</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>toshinarin</bitbar.author> | |
# <bitbar.author.github>toshinarin</bitbar.author.github> | |
# <bitbar.desc>This plugin displays my unread count of ChatWork.</bitbar.desc> | |
# <bitbar.image>https://www.chatwork.com/imagenew/all/common/logo/img_logo_chatwork.svg?1458088542</bitbar.image> | |
# <bitbar.dependencies>python</bitbar.dependencies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e=document.createEvent('MouseEvents'),t=true,f=false; | |
e.initMouseEvent("click",t,t,window,0,0,0,20,10,f,f,f,f,0,null); | |
setInterval(function(){Array.prototype.forEach.call(document.querySelectorAll('#box span'),function(n){ | |
n.dispatchEvent(e); | |
})},4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 3 ]; then | |
echo "Please specify asana API key, dest dir, task id." 1>&2 | |
exit 1 | |
fi | |
API_KEY=$1 | |
TASK_ID=$3 | |
SAVE_DIR="${2}/task_${TASK_ID}" |
NewerOlder