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 / buy.scss
Last active Jul 31, 2019
Fix for column layout on online retailer and map issue
View buy.scss
.col-sm-4 {
@include span-columns(3);
@include media($device) {
@include span-columns(6);
text-align: center;
}
}
.map {
@include span-columns(8);
@robertcedwards
robertcedwards / gist:d0148673f329df35ae052e55f1ac10ec
Created Jul 30, 2019
Fix for column layout http://localhost/how-to-buy/#online-retailers
View gist:d0148673f329df35ae052e55f1ac10ec
<div class="row shoplinks">
<div class="col-md-6">
<a target="_blank" href="http://www.ylighting.com/brand/Modern-Fan-Co/_/N-1sbf4">
<img src="http://localhost/wp-content/uploads/2019/06/Ylighting_Logo.gif" alt="Modern Fan at YLighting" scale="0">
<p>&gt;&gt; Shop YLighting</p>
</a>
</div>
<div class="col-md-6">
View gist:0c98521ecc52f0f4ccbe0cde8c8b520f
jQuery(document).ready(function($){
$('section.loading').fadeOut('fast');
$('section.gallery').imagesLoaded(function() {
$('.gallery').packery({
itemSelector: 'div',
gutter: 10
});
$('section.gallery').addClass('loaded');
});
@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
You can’t perform that action at this time.