To set up:
- Clone this repo. (Or just copy
serve.gointo a folder on your computer). cdinto it, and rungo build serve.go
You can now run the binary like this: ./serve --root="/path/to/directory"
But to make it easier, put this in your .bashrc:
To set up:
serve.go into a folder on your computer).cd into it, and run go build serve.goYou can now run the binary like this: ./serve --root="/path/to/directory"
But to make it easier, put this in your .bashrc:
| Modernizr.addTest('track', function () { | |
| var t = document.createElement('track'); | |
| return t.track && t.track.kind; | |
| }); |
| # app/models/item.rb | |
| require 'concerns/sortable' | |
| class Item < ActiveRecord::Base | |
| include Sortable | |
| attr_accessible :title | |
| end |
| { | |
| "directory": "bower_components", | |
| "json": "bower.json" | |
| } |
This is a spec to verify that your Mocha Spec Runner page can actually load all its script tags.
Paste it into your Spec Runner page as an inline script, just before mocha.run();.
Why?
If one of your source scripts fails to load (e.g. due to a malformed URL), you usually don't get any error message. This can cause confusing test failures that are hard to debug.
| function job() { | |
| if [[ -z "$1" ]]; then | |
| echo "You must specify a project name!" | |
| return; | |
| fi | |
| mkdir $1 && cd $1 \ | |
| && yo ig-job \ | |
| && subl . && subl ./app/scripts/main.js && subl ./app/scripts/config.js \ | |
| && osascript -e 'tell application "Terminal" to activate' \ | |
| -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' \ |
| $ grunt | |
| Running "jshint:all" (jshint) task | |
| >> 2 files lint free. | |
| Running "clean:server" (clean) task | |
| Running "coffee:dist" (coffee) task | |
| File .tmp/scripts/hello.js created. | |
| Running "coffee:test" (coffee) task |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller | |
| // fixes from Paul Irish and Tino Zijdel | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; | |
| for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { |
| /* | |
| * Copyright 2011 The Closure Compiler Authors. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| #!/bin/bash | |
| # License: Public Domain. | |
| # Author: Joseph Wecker, 2012 | |
| # | |
| # -- DEPRICATED -- | |
| # This gist is slow and is missing .bashrc_once | |
| # Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch | |
| # (Thanks gioele) | |
| # | |
| # Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? |