Skip to content

Instantly share code, notes, and snippets.

View shrunyan's full-sized avatar

Stuart Runyan shrunyan

View GitHub Profile
@shrunyan
shrunyan / Gruntfile.js
Last active August 29, 2015 14:07 — forked from ginpei/Gruntfile.js
// ./Gruntfile.js
module.exports = function(grunt) {
grunt.loadTasks('hoge');
};
@shrunyan
shrunyan / debugging-memory-leaks-in-the-browser.md
Last active August 29, 2015 14:10
Notes for my San Diego JS lighting talk on December 2nd, 2014.

Debugging Memory Leaks in the Browser

Speaker: @stuartrunyan

Venue: San Diego JS

Date: Decemeber 2nd

  1. Clean Room
  2. Determining If You Have a Memory Leak
@shrunyan
shrunyan / httpd.conf
Last active August 29, 2015 14:16
httpd.conf
# @see http://getgrav.org/blog/mac-os-x-apache-setup-multiple-php-versions
# Symlinked /etc/apache2/httpd.conf to this repo httpd.conf
# sphp cli to switch PHP versions maintained by brew
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
@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/
@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 / 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 / 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 / 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);

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: