Skip to content

Instantly share code, notes, and snippets.

View jaredpalmer's full-sized avatar

Jared Palmer jaredpalmer

View GitHub Profile
@jaredpalmer
jaredpalmer / hyperhue.idea.js
Last active November 15, 2018 15:30
Hyperterm x Philips Hue
const Hue = require('node-hue-api')
exports.decorateConfig = (config) => {
const { host, username, light } = config.hyperhue
const api = new Hue.HueApi(host, username)
api
.lightStatus(1)
.then(status => {
const { on, hue, sat, bri } = status
const color = `hsb(${hue},${sat},${bri})`
@jaredpalmer
jaredpalmer / index.html
Last active July 14, 2016 16:16
vertical trio
<div class="xs-mb6 xs-mx-auto" style="max-width: 580px">
<div class="clearfix gutters xs-mb5">
<div class="col xs-col-2 sm-col-2">
<div class="circle xs-text-center xs-align-middle" style="height: 4rem; width: 4rem; line-height: 4rem; border: 2px solid #79589F">
<div class="xs-text-2 text-purple" style="line-height: 3.8rem !important;">1</div>
</div>
</div>
<div class="col xs-col-10 sm-col-10">
<h3 class="bold xs-mb1">AKBD</h3>
<p class="xs-text-5">Industry newcomers can make an immediate impression on prospective clients and employers by earning this entry-level certification. A minimum of two years of kitchen/bath industry experience is required.</p>
@jaredpalmer
jaredpalmer / Idea.md
Last active July 22, 2016 23:03
jsxstyle Psuedo Selector API Proposal

jsxstyle + Pseudo Selector API Proposal

Background / Motivation

Pete Hunt's jsxstyle library is incredibly fun to use. It colocates your React component's styling and functionality in the same place and with the same syntax: props. In exchange for this enormous benefit and productivity boost, you must give up pseudo selectors like :hover, :focus, etc. as they are not possible with inline css. This makes things like buttons and inputs extremely challenging. For example, this is a button component from a current project of mine:

// Button.js
import React, { Component } from 'react'
import {Flex} from 'jsxstyle'
@jaredpalmer
jaredpalmer / image.html
Created June 24, 2016 16:21
Newsletter Body Image
<a href="https://www.washingtonpost.com/news/the-switch/wp/2016/06/24/the-british-are-frantically-googling-what-the-eu-is-hours-after-voting-to-leave-it/" target="_blank">
<img class="bodyImage" src="http://ichef.bbci.co.uk/news/624/cpsprodpb/15AA2/production/_90083788_googeu2.jpg" width="486" height="274"/>
</a>
@jaredpalmer
jaredpalmer / advanced.md
Created June 15, 2016 13:00 — forked from koenbok/advanced.md
Learn Programming

Advanced Programming

Programming setup

  • Instant visual output.
  • Fast startup time, fast execution.
  • Sensible errors, with code locations.
  • Easy to set up and get working.

Architecture

@jaredpalmer
jaredpalmer / keybase.md
Created June 15, 2016 10:07
keybase.md

Keybase proof

I hereby claim:

  • I am jaredpalmer on github.
  • I am jaredpalmer (https://keybase.io/jaredpalmer) on keybase.
  • I have a public key whose fingerprint is 9885 CBA7 BA1C 902A 2A6C 46FE 6299 5319 5A64 B360

To claim this, I am signing this object:

/party/:id
/person/:id
id
isActive
firstName
lastName
designation
email
billingAddress {}
<h4 style="font-size: 16px; font-weight: bold; letter-spacing: .02em; color: #0070ff !important; font-family: -apple-system,BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.4em; margin: 0 0 6px;">TOP STORIES</h4>
@jaredpalmer
jaredpalmer / index.js
Created April 8, 2016 16:40 — forked from netsensei/index.js
Using the Promise library + Fast-CSV to read/write CSV files
var promiseCSV = require('promiseCSV.js');
var path = "in.csv";
var options = { 'headers': true };
promiseCSV(path, options).then(function (records) {
// do other stuff
});
@jaredpalmer
jaredpalmer / tweet.js
Created April 6, 2016 22:45
send-tweet.js
/*
* Code snippet for posting tweets to your own twitter account from node.js.
* You must first create an app through twitter, grab the apps key/secret,
* and generate your access token/secret (should be same page that you get the
* app key/secret).
* Uses oauth package found below:
* https://github.com/ciaranj/node-oauth
* npm install oauth
* For additional usage beyond status updates, refer to twitter api
* https://dev.twitter.com/docs/api/1.1