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:
| 'use strict'; | |
| const crypto = require('crypto'); | |
| const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
| const IV_LENGTH = 16; // For AES, this is always 16 | |
| function encrypt(text) { | |
| let iv = crypto.randomBytes(IV_LENGTH); | |
| let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |
I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!
Install FFmpeg
Install ImageMagick
| #!/usr/bin/env bash | |
| hidutil property --set '{"UserKeyMapping": | |
| [{"HIDKeyboardModifierMappingSrc":0x7000000e7, | |
| "HIDKeyboardModifierMappingDst":0x70000002a}] | |
| }' |
We run multiple server processes in two data centers. Each process listens on two ports, one for HTTP and one for HTTPS. HTTPS is terminated by Apache prior to reaching node.js. HTTP goes directly from the client to node.js (through a master load balancer). We do not use clusters. We slice our physical servers into thin virtual machines running SmartOS, each with about 3GB of memory designed for a single node.js process.
Our node.js servers are hapi.js servers using the composer functionality and plugins architecture. We have three sets of plugins loaded: mobile web front end experience (single page app), legacy API reverse proxy, and monitoring.
We also serve original node.js services off another server zone which runs closed source plugins using hapi.
| Create an Order History page listing a user's order in the following format. | |
| {confirmation_number} - {event_name} | |
| You have access to the following data via a Web API | |
| 1. API to fetch orders for the current user: | |
| https://tm-service.herokuapp.com/orders | |
| 2. API to fetch details of an order: | |
| https://tm-service.herokuapp.com/orders/{order_id} |
| javascript:(function(){ var h=window.location.host.split('.');var t=prompt("cookie key");var a=prompt("value");if (t && a) {document.cookie = t+"="+a+"; path=/; domain="+("."+h[h.length-2]+"."+h[h.length-1]);}})() |
| Create an Order History page listing a user's order in the following format. | |
| {confirmation_number} - {event_name} - {number_of_times_clicked} | |
| You have access to the following data via a Web API | |
| 1. API to fetch orders for the current user: | |
| https://tm-service.herokuapp.com/orders | |
| 2. API to fetch details of an order: | |
| https://tm-service.herokuapp.com/orders/{order_id} |
| - Trailing commas are ok | |
| - No reserved words for property names | |
| - NaN, Infinity, undefined : are all constants | |
| - parseInt() defaults to radix 10 | |
| - /regexp/ produces new reg ex object every time | |
| - JSON.parse(), JSON.stringify() | |
| - Function.prototype.bind | |
| - String.prototype.trim | |
| - Array.prototype.every, filter, forEach, indexOf, lastIndexOf, map, reduce, reduceRight, some, | |
| - Date.now() |