Skip to content

Instantly share code, notes, and snippets.

@clearxlate
clearxlate / cube_final.txt
Created March 10, 2021 03:46
cube cheat sheet
1.) Yellow Flower
2.) White Cross (hold white down)
3.) First Row
white corner pieces
line up other colore and trigger
4.) Second Row
make T with non yellow.
spin top toward then trigger
then solve using step 3
#!/bin/bash
AUTHINFO=$(cat<<-EOM
y
admin
$(security find-generic-password -ws anyconnect)
EOM
)
if [ "$1" == "on" ]
@clearxlate
clearxlate / tdp_switch.sh
Created December 7, 2020 10:00
applescript to switch target display mode on headful imac
#!/bin/bash
osascript -e 'tell application "System Events" to key code 144 using command down delay'
@clearxlate
clearxlate / gist:4bbf5ae5ff26ebfc9c2cc9876ac29da6
Last active November 29, 2020 04:35
Create animated gif from video
# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".>
rm "${1}.png"
}