Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew install FORMULA | |
brew switch FORMULA VERSION | |
git checkout -- Library/Formula/FORMULA.rb # reset formula | |
## Example: Using Subversion 1.6.17 | |
# |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
beforeEach(function() { | |
this.addMatchers({ | |
toBeInstanceOf: function(expectedInstance) { | |
var actual = this.actual; | |
var notText = this.isNot ? " not" : ""; | |
this.message = function() { | |
return "Expected " + actual.constructor.name + notText + " is instance of " + expectedInstance.name; | |
}; | |
return actual instanceof expectedInstance; | |
} |
A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.
Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).
<?php | |
class PhotoApiTest extends TestCase { | |
public function setUp() | |
{ | |
parent::setUp(); | |
Route::enableFilters(); |
/* | |
* If we assume that the philosophy of a provider is only configuration then it makes more sense in most | |
* cases to test that "it" is configured. As the "it" in this case is the resulting service, using | |
* module to do the configuration and then inject to test that the configuration worked seems to make sense. | |
* The trick to understanding these tests is to realize that the function passed to module() does not get called until inject() does it's thing. So assigning to a closure variable in the module initialization function ensures that the Provider is defined before control passes to the injected function. Then you're free to interact with the Provider's configuration interface. The technique is a little bit broken in that the Provider has already provided it's Service. But, if you can tolerate that limitation it works. | |
* | |
* Most of this I learned from https://github.com/angular/angular.js/issues/2274 | |
* | |
* There are multiple describe() suites and it() tests, just to help us trace what's going |
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.