Skip to content

Instantly share code, notes, and snippets.

View shrunyan's full-sized avatar

Stuart Runyan shrunyan

View GitHub Profile
@shrunyan
shrunyan / tracker.js
Created June 26, 2014 16:55
Google analytics tracking augmentation.
jQuery(document).ready(function ($) {
/* <a> TAG TRACKER
* @Version: 0.0.2
* @Author: Stuart Runyan
* @Documentation: http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html
* @trackList: Add all domains that you want to track as "internal".
* Allow regular expressions
* It is not neccessary to include the domain this code resides on.
* If the active domain is include in the list there are checks to insure
* we don't double track.
@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 / 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 / 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')
}
})