Skip to content

Instantly share code, notes, and snippets.

View shrunyan's full-sized avatar

Stuart Runyan shrunyan

View GitHub Profile
@shrunyan
shrunyan / zesty-form.html
Last active August 29, 2015 14:22
Example form on the Zesty.io platform
<form action="/thank-you/" method="POST" enctype="multipart/form-data">
<!-- These values control how Zesty understands the form. -->
<input name="zlf" value="{{ page.title }} Form Request" type="hidden">
<input name="zcf" value="1" type="hidden">
<label for="first_name">First Name*</label>
<input name="first_name" id="first_name" maxlength="50" type="text" required autofocus />
<label for="last_name">Last Name*</label>
@shrunyan
shrunyan / local-website-dev-steps.md
Last active August 29, 2015 14:21
Steps to create a local development website

How to Setup a Local Development Website

Instructions from a Macbook pro running OSX 10.10

Create a Project Directory

Either checkout an existing repostiory or create a new one.

Existing:

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@shrunyan
shrunyan / factory.js
Created April 28, 2015 17:51
Experimenting with factories in javascript
var proto = {
test: "test"
};
var Factory = function (proto) {
return Object.create(proto);
};
var instance = Factory(proto);
@shrunyan
shrunyan / promise.es6.js
Last active August 29, 2015 14:20
Playing around with ES6 Promises
'use strict'
let promise = new Promise(function (resolve, reject) {
// Do shiz
if (false) {
reject(new Error('fucked up'))
} else {
resolve('true')
}
})
@shrunyan
shrunyan / sublimetext3_user_config.js
Last active August 29, 2015 14:19
User configuration file for Sublime Text 3
// The settings here override the "Default/Preferences.sublime-settings"
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Seti_UI/Scheme/Seti.tmTheme",
// Note that the font_face and font_size are overridden in the platform
// specific settings file, for example, "Preferences (Linux).sublime-settings".
@shrunyan
shrunyan / keybase.md
Last active September 16, 2015 00:05

Keybase proof

I hereby claim:

  • I am shrunyan on github.
  • I am stuartrunyan (https://keybase.io/stuartrunyan) on keybase.
  • I have a public key whose fingerprint is 8D72 FEEF 37E7 4BAE 5966 FB39 6E65 6E79 DB7F A5BF

To claim this, I am signing this object:

@shrunyan
shrunyan / sdjs-meetup-api.js
Last active August 29, 2015 14:18
Run this with iojs to fetch the next 3 upcoming SDJS meetups
"use strict"
/**
* Meetup API Events Request
* Requests the next 3 SDJS upcoming events and returns an array of event objects
* @see http://www.meetup.com/meetup_api/
*
* Go here to get your API_KEY
* @see https://secure.meetup.com/meetup_api/key/
*/
@shrunyan
shrunyan / react_props_vs_state
Last active August 29, 2015 14:16
Explanation of `props` vs. `state` in react.
"The difference between the two is how they change. `props` can be thought of as the input
from the outside world. It’s set from the parameters your component is called with, and
its values should be treated as immutable. `State`, on the other hand, is the data that’s
owned by your component. You update it via the `setState` method, and no one else should
be changing it on you."
-- http://www.crashlytics.com/blog/building-user-interfaces-with-react/