-
Install Arduino IDE
-
Install teensyduino using its installer
-
Run the following:
cd /Applications/Arduino.app/Contents/Java/hardware/teensy git init git add -A
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 | |
| # Usage: ./add-overlay-text.sh input.mp4 "For Review" | |
| set -e | |
| SOURCE_FILE=$1 | |
| OUTPUT_FILE="${SOURCE_FILE%.*}_overlay.${SOURCE_FILE##*.}" | |
| OVERLAY_TEXT=$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
| #!/usr/bin/env bash | |
| # Usage: ./image-compare.sh "${URL_A}" "${URL_B}" | |
| # Example: ./image-compare.sh https://placekitten.com/g/200/300 https://placekitten.com/200/300 | |
| TMP_DIR=$(mktemp -d) | |
| IMG_A_URL="$1" | |
| IMG_A_FILENAME=$(echo "${IMG_A_URL}" | sed -E 's|^.*/([^/]+)(\?.*)?$|\1|') | |
| IMG_A_EXT=$(echo "${IMG_A_FILENAME}" | sed -E 's|^.*\.(.+)|\1|') | |
| IMG_B_URL="$2" |
cd /tmp
time dd if=/dev/zero bs=2048k of=tstfile count=8192 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }'
ls -al tstfile
time dd if=tstfile bs=2048k of=/dev/null count=8192 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }'Note: If the machine has more than 16GB of free RAM, the read speed may be incorrect due to RAM caching.
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
| ; Set bed and extruder temps | |
| M190 S70 | |
| M109 S180 | |
| ; Home X/Y | |
| G28 X0.00 Y0.00 | |
| G1 Y150 X0 Z10 F3000 | |
| G30 S-1 | |
| G1 Y150 X0 Z10 F3000 |
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
| const { StringDecoder } = require('string_decoder'), | |
| input = 'abc😧🤕', | |
| length = Buffer.byteLength(input); | |
| function trimToSize(str, byteLength) { | |
| const decoder = new StringDecoder('utf8'), | |
| buffer = new Buffer(str); | |
| return decoder.write(buffer.slice(0, byteLength)); | |
| } |
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 -e | |
| SRC_DIR=$1 | |
| DEST_DIR=$2 | |
| TMP_DIR=/tmp/photo-frame | |
| if [ -z "${SRC_DIR}" ] || [ -z "${DEST_DIR}" ]; then | |
| echo "Usage: $(basename $0) ./src-dir ./dest-dir" |
I hereby claim:
- I am onebytegone on github.
- I am onebytegone (https://keybase.io/onebytegone) on keybase.
- I have a public key whose fingerprint is 4071 BFAF 2C34 4904 10B1 9C00 3025 37F3 89FE E7DB
To claim this, I am signing this object:
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
| $('.widget').each(function() { | |
| var GRID_SIZE = 12, | |
| el = $(this), | |
| title = el.find('.title_text').text(), | |
| roundToGrid; | |
| roundToGrid = function(value) { | |
| return Math.ceil(value / GRID_SIZE) * GRID_SIZE; | |
| }; |
NewerOlder