Skip to content

Instantly share code, notes, and snippets.

View parties's full-sized avatar

Eric Ogden parties

View GitHub Profile

bash notes

ffmpeg

  • timelapse video
    # setpts multiplier: smaller is faster
    ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" -an output.mp4
  • compress
@parties
parties / machine.js
Last active November 15, 2019 18:26
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=87c88987f5c4486dea99e7a31271068a
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@parties
parties / machine.js
Created November 4, 2019 19:34
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=ab052f1186730c080005e55cd8aaf97f
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
@parties
parties / machine.js
Last active October 31, 2019 04:52
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=96707d1e0906f00009a3d7fd567f18d1
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@parties
parties / machine.js
Created October 30, 2019 18:56
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=47a6ef45e8a0d47b247d9193e3151bf4
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@parties
parties / machine.js
Last active October 30, 2019 05:09
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=0f8b8f754118cad1507fd3b77fb5ad72
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@parties
parties / machine.js
Created October 30, 2019 04:07
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@parties
parties / machine.js
Created October 28, 2019 16:55
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@parties
parties / docker-shortcuts.sh
Created July 3, 2019 04:20
some docker delete shortcuts
alias docker_rm_containers='docker rm $(docker ps -a -q)'
alias docker_rm_dangling='docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null'
alias docker_kill_all='docker kill $(docker ps -a -q)'
alias docker_rm_images='docker rmi $(docker images -a -q)'
alias docker_danger_rm_all='docker rmi $(sudo docker images -aq) --force'
@parties
parties / renameReactJsToJsx.sh
Last active March 29, 2024 01:03
rename all *.js files containing React markup to *.jsx
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \;