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 ESLintFix() | |
silent execute "!./node_modules/.bin/eslint --fix %" | |
edit! % | |
Neomake | |
endfunction | |
nnoremap <leader><leader> :call ESLintFix()<CR> |
convert favicon.png -resize 16x16 favicon.ico; | |
convert favicon.png -resize 16x16 favicon_16x16.png; | |
convert favicon.png -resize 32x32 favicon_32x32.png; | |
convert favicon.png -resize 64x64 favicon_64x64.png; | |
convert favicon.png -resize 128x128 favicon_128x128.png; | |
echo "conversion complete"; |
App = Ember.Application.create(); | |
App.Router.map(function() { | |
this.route('post', { path: '/:post_id' }); | |
}); | |
posts = [{ | |
id: 0, | |
title: "Rails is omakase", | |
body: "There are lots of à la carte software environments in this world." |
var App = Ember.Application.create(); | |
App.ApplicationController = Ember.Controller.extend({ | |
bag: ['Protein Shake', 'Training Shoes', 'Steroids', 'Insulin Shots'], | |
home: [], | |
actions: { | |
leaveAtHome: function(items) { | |
items.forEach(function(item) { | |
this.get('bag').removeObject(item); | |
this.get('home').addObject(item); |
function compare(choice1, choice2) { | |
if (choice1 === choice2) { | |
return 'Result is a tie'; | |
} else if (choice1 === 'rock') { | |
if (choice2 === 'scissors') { | |
return 'Rock wins'; | |
} else if (choice2 === 'paper') { | |
return 'Paper wins'; | |
} | |
} else if (choice1 === 'paper') { |
var _dictionary = { | |
'rock,scissors': 'Rock', | |
'rock,paper': 'Paper', | |
'scissors,paper': 'Scissors' | |
}; | |
function compare(a, b) { | |
var result; | |
if (a === b) { | |
result = 'Result is a tie'; |
/** client.js **/ | |
var https = require('https'); | |
var url = require('url'); | |
function Client() {} | |
/** | |
* All initialization code should be here. | |
*/ | |
Client.prototype.initialize = function() {}; |
//To get the GPS coordinate from the mobile browser: | |
navigator.geolocation.getCurrentPosition(function(location) { | |
// location.coords.longitude; | |
// location.coords.latitude; | |
}); | |
//To let the server receive data, you'll need to create a service that will handle your json data. | |
//e.g. in node.js/express |
// Basic entity-component closure | |
function Component(api) { | |
return function(entity) { | |
for(var key in api) { | |
if (api.hasOwnProperty(key)) { | |
entity[key] = api[key]; | |
} | |
} | |
} | |
} |