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:
function Foo(who) { | |
this.me = who; | |
} | |
Foo.prototype.identify = function() { | |
return "I am " + this.me; | |
}; | |
function Bar(who) { | |
Foo.call(this,"Bar:" + who); |
// X-browser print local datetime w/ yyyy-MM-dd HH:mm:ss TZInfo format | |
// e.g. 2014-11-20 03:16:26 GMT+0900 (JST) | |
// @author noromanba http://flavors.me/noromanba | |
// @license CC0 Univ PD http://creativecommons.org/publicdomain/zero/1.0 | |
// c.f. | |
// https://gist.github.com/noromanba/6736822 | |
// http://let.hatelabo.jp/noromanba/let/hJmcrJfO94ka/rev/hJmcruLM2p0H | |
// http://let.hatelabo.jp/noromanba/let/hJmcrJfO94ka | |
var toDateTimeTZInfoString = (function () { |
var data = [ | |
10, | |
32, | |
59, | |
21, | |
66, | |
32, | |
12, | |
92, |
// Mocked Service | |
angular.module('mock.users', []). | |
factory('UserService', function($q) { | |
var userService = {}; | |
userService.get = function() { | |
return { | |
id: 8888, | |
name: "test user" | |
} |
## within current branch, squashes all commits that are ahead of master down into one | |
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case) | |
## commit any working changes on branch "mybranchname", then... | |
git checkout master | |
git checkout -b mybranchname_temp | |
git merge --squash mybranchname | |
git commit -am "Message describing all squashed commits" | |
git branch -m mybranchname mybranchname_unsquashed | |
git branch -m mybranchname |
package src.exercises | |
import scala.math._ | |
import BigInt.probablePrime | |
import util.Random | |
object chap01 { | |
// 1. In the Scala REPL, type 3. followed by the Tab key. What methods can be | |
// applied? | |
// => Do it in REPL. There are many methods including %, &, *, +, toByte, toChar etc. |
// 1. The signum of a number is 1 if the number is positive, -1 if it is negative, and | |
// 0 if it is zero. Write a function that computes this value. | |
def signum(n: Int) = { | |
if (n > 0) 1 | |
else if (n < 0) -1 | |
else 0 | |
} //> signum: (n: Int)Int | |
signum(4) //> res0: Int = 1 |
(function (root, factory) { | |
if ( typeof define === 'function' && define.amd ) { | |
define([], factory(root)); | |
} else if ( typeof exports === 'object' ) { | |
module.exports = factory(root); | |
} else { | |
root.myPlugin = factory(root); | |
} | |
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) { |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |