Skip to content

Instantly share code, notes, and snippets.

@houhr
houhr / index.html
Last active February 15, 2017 17:44
Working-Hours-vs-Sitting-Hours
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Working Hours vs. Sitting Hours</title>
<link href="https://fonts.googleapis.com/css?family=Dosis|Merriweather:700" rel="stylesheet">
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v0.4.min.js"></script>
{
"description": "The perfect scaffolding for React + Babel + Webpack + d3 development in Atom",
"repository": {
"type": "git",
"url": ""
},
"dependencies": {
"autoprefixer-loader": "^3.2.0",
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
{
"html": {
"tag_case": "lower",
"attr_quotes": "double",
"self_closing_tag": true
},
"jsx": {
"tag_case": "lower",
"attr_quotes": "single",
"self_closing_tag": true
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
}
}
apm install linter linter-htmlhint linter-scss-lint linter-eslint linter-jsonlint emmet-atom language-babel auto-update-packages
const Instructions = ({title, steps}) =>
<section className='instructions'>
<h2>{title}</h2>
{steps.map(step, i)=>
<p key={i}>step</p>
}
</section>
export default Instructions
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> <title>Pure React Samples</title> </head>
<body>
<!-- Target Container -->
<div id="react-container"></div>
<!-- React, React DOM & Babel-->
<script src="https://unpkg.com/react@15/dist/react.js"></script>
#include <Adafruit_NeoPixel.h>
#define PIN 13
#define NUMPIXELS 8
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int sensorValue;
void setup() {
// put your setup code here, to run once:
pinMode(11, OUTPUT);
#include <Adafruit_NeoPixel.h>
#define PIN 6
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
@houhr
houhr / PIR.ino
Last active October 28, 2015 23:43
int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
// declare the ledPin as an OUTPUT:
Serial.begin(9600);
}
void loop() {
// read the value from the sensor: