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:
$ ruby -v | |
ruby 1.9.2p136 (2010-12-25) | |
$ ruby symbol_literals.rb | |
valid as first char: | |
@$_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz | |
valid as middle char: | |
_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 | |
valid as end char: | |
!_=?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 |
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
<!DOCTYPE HTML> | |
<html> | |
<!DOCTYPE HTML> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=no" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap Test</title> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.css" > | |
<script type="text/javascript" charset="utf-8" |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
/* | |
* Set up factories, then create them in tests with (for example): | |
* | |
* LineItemFactory(); | |
* | |
* Or with attributes / overrides: | |
* | |
* LineItemFactory({ | |
* "id": 123, | |
* "order": OrderFactory({"firstName": "Example Associated Record Override"}), |
var buggyAndroid = parseInt((/android (\d+)/.exec(window.navigator.userAgent.toLowerCase()) || [])[1], 10) < 4; | |
if (!history.pushState || buggyAndroid) { | |
if (window.location.hash) { | |
if(window.location.pathname !== '/') window.location.replace('/#!' + window.location.hash.substr(2)); //Hash and a path, just keep the hash (redirect) | |
} else { | |
window.location.replace('/#!' + window.location.pathname); //No hash, take path | |
} | |
} | |
//And then in app.config: |
# Support running Whenever cron jobs with Lockrun | |
# Lockrun: http://www.unixwiz.net/tools/lockrun.html | |
# lockrun typically installed at /usr/bin/lockrun | |
# On Mac, install with: brew install lockrun | |
# Lockrun prefix for cronjobs: /usr/bin/lockrun --lockfile=/path/to/tmp/JOBNAME.lockrun -- sh -c "COMMAND" | |
def wrap_with_lockrun command | |
"/usr/bin/env lockrun --lockfile=:path/tmp/:lockfile.lockrun -- sh -c \"#{ command }\"" | |
end | |
#redefine the three default job types to use Lockrun (i.e. just add 'lockrun_' in front of the existing job names) |
Every time I start a new project, I want to pull in a log
function that allows the same functionality as the console.log
, including the full functionality of the Console API.
There are a lot of ways to do this, but many are lacking. A common problem with wrapper functions is that the line number that shows up next to the log is the line number of the log function itself, not where log
was invoked. There are also times where the arguments get logged in a way that isn't quite the same as the native function.
This is an attempt to once and for all document the function that I pull in to new projects. There are two different options:
BEFORE YOU CONTINUE:
mrt
is no longer used with Meteor 1.0These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).
Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on