Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Iain IainIsCreative

🎯
Focusing
View GitHub Profile
@IainIsCreative
IainIsCreative / bot_receiver.ino
Created Aug 3, 2018 — forked from ShawnHymel/bot_receiver.ino
Plastic Ant Combat Bot Receiver
View bot_receiver.ino
/**
* Two Channel Receiver
* Author: Shawn Hymel (SparkFun Electronics)
* Date: Aug 24, 2017
*
* Updated Sep 28, 2017 - Added direction multiplier (DIR) to
* account for transmitter controller directions.
*
* Connect a TB6612FNG and RC (PWM) receiver to the Arduino.
* Mixes two channels for arcade drive.
@IainIsCreative
IainIsCreative / README.md
Last active Mar 26, 2018
Johnny-Five Smooth Hue Transition
View README.md

Smooth RGB Hue Transition with Johnny-Five

This is a method of getting a smooth color transition from one color to the next for RGB Leds using Johnny-Five. The function changes the hue and goes through steps instead of just jumping to a color.

Required Packages

  • Johnny-Five
  • color-convert
  • Temporal (for non blocking sequences in place of setInterval.
View Button.react.js
import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import css from './Button.css';
export default class Button extends Component {
render() {
const {
className,
@IainIsCreative
IainIsCreative / contactform.js
Created Apr 26, 2017 — forked from insin/contactform.js
React contact form example
View contactform.js
/** @jsx React.DOM */
var STATES = [
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI',
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS',
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR',
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'
]
var Example = React.createClass({
@IainIsCreative
IainIsCreative / .wp-htaccess
Last active Apr 21, 2016
A `.htaccess` snippet we use for our WordPress projects
View .wp-htaccess
# ######################################################################
# CUSTOM HELPERS
# ######################################################################
# ----------------------------------------------------------------------
# Load images from remote server if they aren't found locally
# useful once a site has gone into production
# ----------------------------------------------------------------------
@IainIsCreative
IainIsCreative / dploy.example.yaml
Last active Apr 22, 2016
An example file for deploying our WordPress sites in each environment
View dploy.example.yaml
# Dploy won't ever upload dev, dev should only be used for local env
# Add theme folder name, and subdomain for staging
# Dploy will only target the theme folder
staging:
host: "staging-host"
user: "staging-user"
pass: "staging-pass"
scheme: "ftp"
port: 21
@IainIsCreative
IainIsCreative / power.scss
Last active Apr 8, 2016
Sass Power Math Function
View power.scss
/**
*
* Power function in Sass.
*
* For power calculations in Sass.
* Place a number as a base, then a number to multiply from. Finally, add an
* exponent number.
*
* Simple example of such math being the speed of light:
* power(3, 10, 8);
@IainIsCreative
IainIsCreative / SassMeister-input.scss
Last active Oct 27, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
@mixin breakpoint($breakpoint) {
// The following code no longer works in libSass 3.3.0
// It will return an error and say it can't pass a content block
//Check if the value passed in is a unitless number
@if not unitless($breakpoint) {
@IainIsCreative
IainIsCreative / SassMeister-input.scss
Last active Oct 26, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
@mixin breakpoint($breakpoint) {
// The following code no longer works in libSass 3.3.0
//Check if the value passed in is a unitless number
@if not unitless($breakpoint) {
//Pass an error if not unitless.
@IainIsCreative
IainIsCreative / SassMeister-input.scss
Created Oct 19, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
// Nested map example
$nested-map: (
key-1: (
deep-key-1: (
deeper-key: true
),
You can’t perform that action at this time.