jq is useful to slice, filter, map and transform structured json data.
brew install jq
| /*************************************************************************** | |
| * Do What THe Fuck You Want To Public Licence 2 * | |
| * * | |
| * JavaScript implementation by Piotr Rochala (http://rocha.la/) * | |
| * Based on C# work of Serge Meunier (http://www.smokycogs.com/) * | |
| * * | |
| * Check this code in action on http://rocha.la/javascript-plasma-fractal * | |
| * * | |
| **************************************************************************/ |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| if (!HTMLVideoElement.prototype.canPlayType) { | |
| HTMLVideoElement.prototype.canPlayType = function(type) { | |
| return [ | |
| "It is certain", | |
| "It is decidedly so", | |
| "Without a doubt", | |
| "Yes definitely", | |
| "You may rely on it", | |
| "As I see it, yes", | |
| "Most likely", |
| #!/usr/bin/env node | |
| var suncalc = require('suncalc'); | |
| var phase = suncalc.getMoonIllumination(new Date()).phase; | |
| var phases = [ | |
| "🌑", | |
| "🌒", | |
| "🌓", | |
| "🌔", | |
| "🌕", |
| #!/bin/bash | |
| set -euo pipefail | |
| function myFunction() { | |
| myCommand | |
| return $? | |
| } | |
| retry=0 | |
| maxRetries=5 |
| extern crate image; | |
| extern crate num_complex; | |
| use std::fs::File; | |
| use image::{ImageBuffer, Luma}; | |
| use num_complex::Complex; | |
| fn main() { | |
| // for a 3 x 2 image: (-2,-1) to (1,1) |
| // Control Effects MIDI Guy sound module | |
| // https://github.com/kinoshita-lab/MIDI-guy/ | |
| // Orca code | |
| .......................................... | |
| ....4Uw..R....6Uq..Rt...2Uq..Rt........... | |
| ......:022cf....:112af....:731af.......... | |
| .......................................... | |
| .......................................... |