Skip to content

Instantly share code, notes, and snippets.

View joelhooks's full-sized avatar
🍄

Joel Hooks joelhooks

🍄
View GitHub Profile
$scope.subscriptions = _.map(_.sortBy(_.filter(subscriptions, function(sub) {
return sub.transactions && sub.transactions.length;
}), function(sub) {
return _.last(sub.transactions).created_at;
}), function(sub) {
var last_transaction = _.last(sub.transactions),
totals = _.reduce(sub.transactions, function (memo, t) {
return memo + t.amount/100.0;
}, 0);
@joelhooks
joelhooks / gear.md
Last active April 2, 2024 20:18
Podcasting Gear List
@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 = [ ];
[
{
"created_at": "Tue Apr 15 23:26:00 +0000 2014",
"id": 456211869691154400,
"id_str": "456211869691154432",
"text": "@zrail Congrats. I think that is close to the highest I've ever heard of.",
"source": "<a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a>",
"truncated": false,
"in_reply_to_status_id": 456211742448566300,
"in_reply_to_status_id_str": "456211742448566272",
@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.

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"
<!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: