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:
| #!/bin/bash | |
| CHANGED_FILES=`git diff origin/master...HEAD --name-only` | |
| node_modules/eslint/bin/eslint.js -f json $CHANGED_FILES --quiet | node_modules/eslines/index.js --quiet | |
| if [[ $? != 0 ]] ; then | |
| echo "Fix style violations" | |
| exit 1 | |
| fi | |
| echo "All changed files are good" |
| var fs = require('fs'), | |
| PDFDocument = require('pdfkit'), | |
| async = require('async'), | |
| ColorThief = require('color-thief'), | |
| colorThief = new ColorThief(); | |
| var bookWidth = 430; | |
| var bookHeight = 343; |
| int doubler(int x) { | |
| return 2 * x; | |
| } |
Zero to hero in an hour — how far can you get?
Some of the worlds best open source projects are initally created in < 1 hr. They're inspired, often caffeine, sleep-deprived or just plain crazy-beans fueled ideas that couldn't be done in a day.
The right time, right place (A Friday afternoon) is the perfect time to pump out what could be a life changing project.
So, lets do something interesting: The lazy web 1hr hackaton.
| brew update | |
| brew cask install java | |
| brew cask install jce-unlimited-strength-policy | |
| export JAVA_HOME=`/usr/libexec/java_home -v 1.8` |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.
| <select name="state"> | |
| <option value="ACT">Australian Capital Territory</option> | |
| <option value="NSW">New South Wales</option> | |
| <option value="NT ">Northern Territory</option> | |
| <option value="QLD">Queensland</option> | |
| <option value="SA ">South Australia</option> | |
| <option value="TAS">Tasmania</option> | |
| <option value="VIC">Victoria</option> | |
| <option value="WA ">Western Australia</option> | |
| </select> |
| # Terminal Progress Indicators. Four examples are included: percentage, | |
| # spinner, progress bar, and combined. This script has been tested on | |
| # Mac OS X 10.8 with Ruby 1.8.7, 1.9.1, 1.9.2, and 1.9.3 | |
| class Spinner | |
| include Enumerable | |
| def each | |
| loop do | |
| yield '|' | |
| yield '/' |