This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
Engineering topic: Less is more
I had a desktop wallpaper a while ago with a single quote, it read:
As a software developer, you are your own worst enemy. The sooner you realize that, the better off you'll be.
As developers, every line of code that we write increases the const of maintaining the project that the code is in. It doesn't matter how clean the code is, how well written it is, how much thought was put into it ahead of time or if it has been refactered: All code carries a debt that can only be paid in time.
The theme of this week's engineering essay: Use the least amount of code possible.
Test libraries, two main alternatives:
Jasmine is older - actively maintained by PivotalLabs, de facto JS testing for Rails projects? So I'd expect there are more gems/projects that integrate Jasmine and Rails compared to Mocha (at the moment anyway).
| ;; based on core.logic 0.8-alpha2 or core.logic master branch | |
| (ns sudoku | |
| (:refer-clojure :exclude [==]) | |
| (:use clojure.core.logic)) | |
| (defn get-square [rows x y] | |
| (for [x (range x (+ x 3)) | |
| y (range y (+ y 3))] | |
| (get-in rows [x y]))) |
| /** | |
| * KineticJS Bezier Extension | |
| * Compatible with KineticJS JavaScript Library v3.8.0 | |
| * Author: Greg Zoller | |
| * Date: Apr 12 2012 | |
| */ | |
| /////////////////////////////////////////////////////////////////////// | |
| // Bezier | |
| /////////////////////////////////////////////////////////////////////// |
| (def tumblr-url "http://pipes.yahoo.com/pipes/pipe.run?_id=4ddef10340ec6ec0374cbd0f73bce819&_render=json") | |
| (defn display-count [json-obj] | |
| (let [data (js->clj json-obj :keywordize-keys true) | |
| post-count (:count data)] | |
| (js/alert (str "Number of posts: " post-count)))) | |
| (defn display-items [json-obj] | |
| (let [data (js->clj json-obj :keywordize-keys true) | |
| items (:items (:value data)) |
| event = require('pilot/event') | |
| Anchor = require('ace/anchor').Anchor | |
| doc = ace_editor.session.getDocument() | |
| editablePositions = [[1, 0, 2, 0]] # allow editong only the second row | |
| jQuery.each editable, (index, row) -> | |
| editablePositions.push [new Anchor(doc, row[0], row[1]), new Anchor(doc, row[2], row[3])] | |
| Range = require('ace/range').Range |
| require 'sinatra' | |
| require 'base64' | |
| require 'cgi' | |
| require 'erb' | |
| require 'openssl' | |
| require 'nokogiri' | |
| def get_sso_data(env) | |
| CGI.unescape env["rack.request.form_hash"]["imsEnterprise"] | |
| end |
Imagine one was required to create a web-based password management system (over SSL! :) with the following requirements:
| // Target API: | |
| // | |
| // var s = require('net').createStream(25, 'smtp.example.com'); | |
| // s.on('connect', function() { | |
| // require('starttls')(s, options, function() { | |
| // if (!s.authorized) { | |
| // s.destroy(); | |
| // return; | |
| // } | |
| // |