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:
| /* right click on an entry in the network log, select Copy All as Har | |
| * type in console: x = [paste] | |
| * paste the following JS code into the console | |
| * copy the output, paste into a file | |
| * then wget -i [that file] | |
| */ | |
| (function(logObj, mime) { | |
| var results = []; | |
| logObj.log.entries.forEach(function (entry) { | |
| if (mime && entry.response.content.mimeType !== mime) return; |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| mongoose.connect('localhost', 'testing_emitUpdate'); | |
| var schema = new Schema({ | |
| name: String | |
| }); | |
| schema.pre('save', function (next) { |
| var mongoose = require('mongoose'), | |
| assert = require('assert') | |
| mongoose.connect('localhost/mydb'); | |
| var Schema = mongoose.Schema; | |
| var ContainerSchema = new Schema({ | |
| name: String, | |
| }) |
| /**************************************** | |
| * GSALib Wrapper for Google Search Appliance | |
| * GSA.Paragon.Utils | |
| * Written by Jon Upchurch | |
| * Copyright 2013 by Paragon Consulting, Inc. | |
| * Free to use, distribute, and modify | |
| * with this credit comment retained. | |
| ****************************************/ | |
| using GSALib.Constants; | |
| using GSALib.GSA; |
The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:
| "use strict"; | |
| /* global console */ | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var browserify = require('gulp-browserify'); | |
| var jshint = require('gulp-jshint'); | |
| var watch = require('gulp-watch'); | |
| var stylish = require('jshint-stylish'); | |
| var refresh = require('gulp-livereload'); | |
| var sass = require('gulp-sass'); |
| var myEfficientFn = debounce(function() { | |
| // All the taxing stuff you do | |
| }, 250); | |
| window.addEventListener('resize', myEfficientFn); |