Skip to content

Instantly share code, notes, and snippets.

View joelhooks's full-sized avatar
🍄

Joel Hooks joelhooks

🍄
View GitHub Profile
import hype.*;
import hype.extended.colorist.HPixelColorist;
int myStageW = 1920;
int myStageH = 1080;
color clrBG = #FFFFFF;
// ********************************************************************************************************************
@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.

[
{
"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 / 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 / gear.md
Last active April 2, 2024 20:18
Podcasting Gear List
$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);
Run options: exclude {:org=>true}
......FFFF.FF.F
Failures:
1) Quarto::Build stripping source code should eq "puts \"hello, world\nif true\n puts \"goodbye, world\nend\n"
Failure/Error: expect(build.strip_listing(code)).to eq(<<END)
expected: "puts \"hello, world\nif true\n puts \"goodbye, world\nend\n"
got: "puts \"hello, world\n if true\n puts \"goodbye, world\n end"
@joelhooks
joelhooks / angularServices.js
Last active December 21, 2015 04:39
Short example of how to declare services in AngularJS.
//from most to least verbose, but it is all the same in the end.
(function() {
var module = angular.module("myApp.myModel", []);
var MyModel = function MyModel() {
this.asyncService = null;
this.someApi = function() {
module.directive('validatePhone', function () {
return {
require: 'ngModel',
link: function (scope, elem, attr, ngModel) {
function validatePhone(field) {
//regex squirreled from here: http://blog.stevenlevithan.com/archives/validate-phone-number
var regexObj = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
return regexObj.test(field);
@joelhooks
joelhooks / dispatcher.js
Last active December 14, 2015 20:59
This is a port of a port. Very basic finite state machine. Requires underscore.
//this is an event dispatcher at its bare minimum.
var EventDispatcher;
(function () {
"use strict";
/**
* Minimal event dispatcher
* @see http://stackoverflow.com/q/7026709/87002
* @constructor
*/