Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Robert C Edwards robertcedwards

🎯
Focusing
Block or report user

Report or block robertcedwards

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robertcedwards
robertcedwards / scrollfix2.js
Created Jun 27, 2019
Another method for onpage load
View scrollfix2.js
var shiftWindow = function() { scrollBy(0, -50) };
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);
@robertcedwards
robertcedwards / scrollfix.js
Created Jun 27, 2019
On hashchange scrollby
View scrollfix.js
window.addEventListener("hashchange", function() { scrollBy(0, -50) })
View gist:9d5b73f94628c49ed22e37c34feee589
/*
Handbrake with ampping and contrain
Check your range with serial monitor and set your numbers below
*/
void setup() {
pinMode(11, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);
}
@robertcedwards
robertcedwards / gist:18df09bae7e5210a7fe7a262afbf1c57
Last active Mar 10, 2019
Handbrake control with mapping for range
View gist:18df09bae7e5210a7fe7a262afbf1c57
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)
View gist:faf5aa33319266f619d8c3925154a632
{
"event": "Wyzecam",
"properties": {
"distinct_id": "4101",
"token": "TOKEN HERE",
"location": "Backyard"
}
}
@robertcedwards
robertcedwards / gist:98ead0018531fc24879aa433f778f26f
Created Dec 4, 2018
Possible data attributes from impress.js
View gist:98ead0018531fc24879aa433f778f26f
* `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 Nov 29, 2018
SSH to remote connection and copy file "locally"
View copy.sh
./dropbearmulti ssh root@remotehost cat test3.jpg > ~/tmp/testsdfsdf.jpg
@robertcedwards
robertcedwards / ⚡️.sh
Created Oct 9, 2018
Get that ⚡️into your bash, at least your Mac Terminal
View ⚡️.sh
#Put this in your terminal and smoke it
$ echo "export PS1=' ⚡️'" >> ~/.bash_profile
# Update shell
$ source ~/.bash_profile
View gist:e46e4b551095e138be1e3c50ea016cd0
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 Jun 19, 2018
Getting MQTT, Wyze, OpenIPCam, and Kerberos Running
View gist:803e640e9c53a35259ceb76f2742db40
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
You can’t perform that action at this time.