Set permissions to allow script to run
chmod a+x ./gitbook-tag-build.sh
Choose an output folder, and an input file containing a list of Git tags.
The default ouput folder is _allBooks
and the default input is .gitbook-tags
################################################################################ | |
# script: Base.coffee | |
# author: Ryan Florence <rpflorence@gmail.com> | |
# license: MIT-Style License | |
# | |
# A surprisingly useful base class for CoffeeScript. Inspired by my old | |
# friend, MooTools Class. Provides default options, mixins, and custom events. | |
class Base | |
defaults: {} |
var getCache = (function() { | |
var supportsLocalStorage = 'localStorage' in window; | |
// both functions return a promise, so no matter which function | |
// gets called inside getCache, you get the same API. | |
function getJSON(key) { | |
return jQuery.getJSON(key).then(function(data) { | |
localStorage.setItem(key, JSON.stringify(data)); | |
}).promise(); | |
} |
/** @jsx React.DOM */ | |
var api = 'http://addressbook-api.herokuapp.com/contacts'; | |
var App = React.createClass({ | |
mixins: [Routed], | |
render: function() { | |
return ( | |
<Root> | |
<Index path="/"/> |
function RandomColorScheme() | |
let mycolors = split(globpath(&rtp,"**/colors/*.vim"),"\n") | |
exe 'so ' . mycolors[localtime() % len(mycolors)] | |
unlet mycolors | |
endfunction | |
call RandomColorScheme() | |
:command NewColor call RandomColorScheme() |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
Personal notes while working through Advanced React: https://courses.reacttraining.com/p/advanced-react
Granted this is a contrived example, but it's still something I took notice to: in those "Advanced React" videos I've been watching, Ryan Florence codes very slowly, and does not make one quick change and jump back to the browser to see what changed.
He stops and thinks. He asks himself (or the viewer) questions. He wonders what
(function (name, definition){ | |
if (typeof define === 'function'){ // AMD | |
define(definition); | |
} else if (typeof module !== 'undefined' && module.exports) { // Node.js | |
module.exports = definition(); | |
} else { // Browser | |
var theModule = definition(), global = this, old = global[name]; | |
theModule.noConflict = function () { | |
global[name] = old; | |
return theModule; |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |