convert image.png -crop 128x128 +repage +adjoin tile-%d.png
This file contains hidden or 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
#http://stackoverflow.com/a/10797966/2913503 | |
urlencode() { | |
local data | |
if [[ $# != 1 ]]; then | |
echo "Usage: $0 string-to-urlencode" | |
return 1 | |
fi | |
data="$(curl -s -o /dev/null -w %{url_effective} --get --data-urlencode "$1" "")" | |
if [[ $? != 3 ]]; then | |
echo "Unexpected error" 1>&2 |
This file contains hidden or 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
https://docs.google.com/spreadsheets/d/%s/export?gid=0&single=true&format=csv | |
https://docs.google.com/spreadsheets/d/{key}/gviz/tq?tqx=out:csv&sheet={sheet_name} |
This file contains hidden or 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
function ensureNodes(children) { | |
if (Array.isArray(children[0])) { | |
return ensureNodes(children[0]) | |
} | |
return children | |
.filter(child => !!child) | |
.map(child => { | |
if (typeof child === 'string') { | |
return document.createTextNode(child); |
This file contains hidden or 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 bash | |
set -xeuo pipefail | |
function get_major_version () { | |
echo "${1}" | grep -Po '[^0-9]+\K(\d+)' | head -n1 | |
} | |
function get_version () { | |
echo "${1}" | grep -Po '[^0-9]+\K([0-9.]+)' | head -n1 | |
} |
Add -mtime -2
to limit files by last modified time. -2
to means "in the last 2*24 hours from now".
echo '' | fzf --print-query --preview "cat *.json | jq {q}"
OlderNewer