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:
/* | |
* node-ws - pure Javascript WebSockets server | |
* Copyright Bradley Wright <[email protected]> | |
*/ | |
// Use strict compilation rules - we're not animals | |
'use strict'; | |
var net = require('net'), | |
crypto = require('crypto'); |
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
//Setup a database connection returning a single row value | |
$this->db->select("*"); | |
$this->db->where("field", $value); | |
$query = $this->db->get("table",1,0); | |
if($query->num_rows() > 0) { | |
$variable = $query->row("field"); | |
return $variable; | |
} else { | |
return FALSE; |
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
clearTimeout(timeout); |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
function rus_to_latin ( str ) { | |
var ru = { | |
'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', | |
'е': 'e', 'ё': 'e', 'ж': 'j', 'з': 'z', 'и': 'i', | |
'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', | |
'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', | |
'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh', | |
'щ': 'shch', 'ы': 'y', 'э': 'e', 'ю': 'u', 'я': 'ya' | |
}, n_str = []; |
Liquid Fill Gauge v1.1 - 7/14/2015
Changes:
Configurable features include:
var gulp = require("gulp"); | |
var gutil = require("gulp-util"); | |
var rename = require('gulp-rename'); | |
var webpack = require("webpack"); | |
var nodemon = require('nodemon'); | |
var typescript = require('gulp-typescript'); | |
// These tasks setup nodemon. | |
gulp.task("start", function(cb) { | |
var options = { |