Skip to content

Instantly share code, notes, and snippets.

View joelhooks's full-sized avatar
🍄

Joel Hooks joelhooks

🍄
View GitHub Profile
@joelhooks
joelhooks / LOG.js
Created January 24, 2014 21:52
Enhanced Logging
.run(function ($rootScope, $log, $window) {
var prepareLogFn = function (logFn) {
var enhancedLogFn = function () {
var modifiedArguments = Array.prototype.slice.call(arguments);
modifiedArguments[0] = [moment().format() + ' '] + modifiedArguments[0];
logFn.apply(null, modifiedArguments);
};
enhancedLogFn.logs = [ ];
@joelhooks
joelhooks / BaseActor.as
Created December 30, 2011 01:39
Robotlegs 2: Flickr Image Gallery Snippets
package robotlegs.bender.demos.imagegallery.base
{
import flash.events.Event;
import flash.events.IEventDispatcher;
/**
* Provides some common functionality for basic application classes (models and services)
*/
public class BaseActor
{
import hype.*;
import hype.extended.colorist.HPixelColorist;
int myStageW = 1920;
int myStageH = 1080;
color clrBG = #FFFFFF;
// ********************************************************************************************************************
aasm :column => :state do
state :proposed, :initial => true
state :cancelled
state :accepted
state :claimed
state :submitted
state :rejected
state :updated
state :approved
state :published
[
{
"slug": "react-redux-the-single-immutable-state-tree",
"question": "What is the *entire* state of the application represented as?",
"answer": "A single Javascript object."
},
{
"slug": "react-redux-describing-state-changes-with-actions",
"question": "What is an action?",
"answer": "A minimally represented change of the state"
@joelhooks
joelhooks / Class.js
Created July 24, 2012 22:59
Simple Javascript Inheritance
/* Simple JavaScript Inheritance
* By John Resig http://ejohn.org/blog/simple-javascript-inheritance/
* MIT Licensed.
*/
// Inspired by base2 and Prototype
(function(){
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
// The base Class implementation (does nothing)
this.Class = function(){};
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<style type="text/css">
/**
* RESETS
*/
/* Based on The MailChimp Reset INLINE: Yes. */
### Keybase proof
I hereby claim:
* I am joelhooks on github.
* I am joelhooks (https://keybase.io/joelhooks) on keybase.
* I have a public key whose fingerprint is 251E 1196 F0E2 7B60 686B E7F2 BE4C F2AD E4D6 2AB7
To claim this, I am signing this object:
@joelhooks
joelhooks / drip_to_convertkit.js
Created January 10, 2019 23:58
This is a little node app that creates individual csv files for each tag in an exported Drip subscriber (people!) csv
const _ = require('lodash')
const fs = require('fs')
const csv = require('csv-parser')
const writer = require('fast-csv')
const csvFilePath = 'PATH_TO.csv'
const filesToBuild = {}
fs.createReadStream(csvFilePath)
@joelhooks
joelhooks / egghead-screencast-guideline.md
Last active December 12, 2019 04:03
It seems trivial to record a 1-8 minute screencast, but there are actually quite a few moving parts when it comes to recording a **high quality** screencast. Here's some of our thoughts on the subject.

Recording a Great Coding Screencast

The Screen

First and foremost a coding screencast is about the code, and we need to make sure it looks great. There are a few aspects to this that help ensure that is the case.

Resolution

720p is the target resolution. In pixel terms this is 1280x720. We've gotten the best results when we record at 2560x1440 in a HiDPI (pixel double) mode, giving an effective visible resolution of 1280x720, but extremely crisp. This resolution is achievable on 27" monitors and retina MBPs.