This file contains 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
#include <RCSwitch.h> | |
RCSwitch mySwitch = RCSwitch(); | |
/* | |
Firmata is a generic protocol for communicating with microcontrollers | |
from software on a host computer. It is intended to work with | |
any host computer software package. | |
To download a host software package, please clink on the following link | |
to open the download page in your default browser. |
This file contains 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
#include <RCSwitch.h> | |
RCSwitch mySwitch = RCSwitch(); | |
byte inByte = 0; | |
void setup() { | |
Serial.begin(9600); | |
// Transmitter is connected to Arduino Pin #10 | |
mySwitch.enableTransmit(2); |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am AgataJot on github. | |
* I am agata (https://keybase.io/agata) on keybase. | |
* I have a public key whose fingerprint is 74DB 87D4 72D7 5CD6 4116 EDA7 5B61 79BB 6B48 925D | |
To claim this, I am signing this object: |
This file contains 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
function detectIE() { | |
if (typeof window === 'undefined') { | |
return true; | |
} | |
var ua = window.navigator.userAgent; | |
var msie = ua.indexOf('MSIE '); | |
if (msie > 0) { | |
// IE 10 or older => return version number | |
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); |
This file contains 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
function getRandomColor() { | |
var letters = '0123456789ABCDEF'.split(''); | |
var color = '#'; | |
for (var i = 0; i < 6; i++ ) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; | |
} |
This file contains 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
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */ | |
position: absolute; | |
opacity: 0; | |
} | |
:root input[type="checkbox"].ios-switch + div { | |
display: inline-block; | |
vertical-align: middle; | |
width: 3em; height: 1em; | |
border: 1px solid rgba(0,0,0,.3); |
This file contains 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains 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
@import 'compass'; | |
$theme1: red; | |
$theme2: maroon; | |
$button_width: 320px; | |
$button_height: 24px; | |
a { | |
background: #fff magick-sprite('button', magick-phantom($button_width, $button_height, |
This file contains 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
<snippet> | |
<content><![CDATA[console.log("$1", $2);]]></content> | |
<tabTrigger>log</tabTrigger> | |
<scope>source.js</scope> | |
<description>console.log ()</description> | |
</snippet> |
This file contains 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
/* | |
.d dP"Yb 888888 88 88 88 88b 88 dP""b8 .dP"Y8 | |
.d88 dP Yb 88 88 88 88 88Yb88 dP `" `Ybo." | |
88 Yb dP 88 888888 88 88 Y88 Yb "88 o.`Y8b | |
88 YbodP 88 88 88 88 88 Y8 YboodP 8bodP' |