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:
public class WebApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
RouteTable.Routes.MapRoute("HttpProxy", "proxy/{*path}", new { controller = "Proxy", action = "Http" }) | |
} | |
} |
using System.IO; | |
using System.Text; | |
using System.Web; | |
using System.Web.Optimization; | |
using Jurassic; | |
namespace Fewt.Web | |
{ | |
public class EmberHandlebarsBundleTransform : IBundleTransform | |
{ |
var mongoose = require('./../mongoose'); | |
var Schema = mongoose.Schema; | |
var sleep = 1000; | |
var timer; | |
var db = mongoose.createConnection(); | |
db.on('error', function () { | |
// error on startup | |
console.error('conn error', arguments); |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
#!/bin/sh | |
# Credits goes to http://stackoverflow.com/questions/1589114/opening-a-new-terminal-tab-in-osxsnow-leopard-with-the-opening-terminal-window#answer-7911097 | |
# I just slightly modified it to take an argument. | |
new_tab() { | |
pwd=`pwd` | |
osascript -e "tell application \"Terminal\"" \ | |
-e "tell application \"System Events\" to keystroke \"t\" using {command down}" \ | |
-e "do script \"cd $pwd; clear; $1;\" in front window" \ |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
<?xml version="1.0"?> | |
<project name="Impact Ant Build" basedir="." default="full-build"> | |
<!-- Change these properties based on your project --> | |
<!-- Project meta data --> | |
<property name="project.name" value="Resident Raver"/> | |
<property name="company.name" value="GameCook"/> | |
<property name="company.site" value="http://gamecook.com"/> | |
<property name="project.version" value="0.8.1"/> |
function resize( imagewidth, imageheight, thumbwidth, thumbheight ) { | |
var w = 0, h = 0, x = 0, y = 0, | |
widthratio = imagewidth / thumbwidth, | |
heightratio = imageheight / thumbheight, | |
maxratio = Math.max( widthratio, heightratio ); | |
if ( maxratio > 1 ) { | |
w = imagewidth / maxratio; | |
h = imageheight / maxratio; | |
} else { | |
w = imagewidth; |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |