Skip to content

Instantly share code, notes, and snippets.

View robertcedwards's full-sized avatar
🖼️
Framing

Robert C Edwards robertcedwards

🖼️
Framing
View GitHub Profile
@robertcedwards
robertcedwards / gist:18df09bae7e5210a7fe7a262afbf1c57
Last active March 10, 2019 05:44
Handbrake control with mapping for range
void setup() {
pinMode(0, INPUT_PULLUP);
}
void loop() {
int val = analogRead(0); //read pot value
val = map(val, 625, 220, 0, 1024);//map range to normal pot range
val = constrain(val, 0, 1024);//then constrain for noise reduction
Joystick.X(val);
//Serial.println(val)
{
"event": "Wyzecam",
"properties": {
"distinct_id": "4101",
"token": "TOKEN HERE",
"location": "Backyard"
}
}
@robertcedwards
robertcedwards / gist:98ead0018531fc24879aa433f778f26f
Created December 4, 2018 18:43
Possible data attributes from impress.js
* `data-x`, `data-y`, `data-z` - they define the position of **the center** of step element on
the canvas in pixels; their default value is 0;
* `data-rotate-x`, `data-rotate-y`, 'data-rotate-z`, `data-rotate` - they define the rotation of
the element around given axis in degrees; their default value is 0; `data-rotate` and `data-rotate-z`
are exactly the same;
* `data-scale` - defines the scale of step element; default value is 1
These values are used by impress.js in CSS transformation functions, so for more information consult
CSS transfrom docs: https://developer.mozilla.org/en/CSS/transform
@robertcedwards
robertcedwards / copy.sh
Last active November 29, 2018 02:52
SSH to remote connection and copy file "locally"
./dropbearmulti ssh root@remotehost cat test3.jpg > ~/tmp/testsdfsdf.jpg
@robertcedwards
robertcedwards / ⚡️.sh
Created October 9, 2018 23:39
Get that ⚡️into your bash, at least your Mac Terminal
#Put this in your terminal and smoke it
$ echo "export PS1=' ⚡️'" >> ~/.bash_profile
# Update shell
$ source ~/.bash_profile
https://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg
accepted
Rotate 90 clockwise:
ffmpeg -i in.mov -vf "transpose=1" out.mov
For the transpose parameter you can pass:
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
@robertcedwards
robertcedwards / gist:803e640e9c53a35259ceb76f2742db40
Created June 19, 2018 21:38
Getting MQTT, Wyze, OpenIPCam, and Kerberos Running
Install Mosquitto, a MQTT Broker(server)
brew install mosquitto
Subscribe to the Kereberos MQTT Topic set in configuration as an output
mosquitto_sub -t kios/mqtt
@robertcedwards
robertcedwards / keybase-proof
Created March 7, 2018 21:00
robertcedwards Keybase proof
### Keybase proof
I hereby claim:
* I am robertcedwards on github.
* I am robertcedwards (https://keybase.io/robertcedwards) on keybase.
* I have a public key ASBvPiFlwnag-j-0MgmtzDYbprFgWI7cs7xZB4FVQETxFgo
To claim this, I am signing this object:
https://www.hackster.io/rayburne/esp8266-mini-sniff-f6b93a
https://www.npmjs.com/package/node-dash-button