#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ _____ _ _ | |
\ | __ \ | | | | | |
\\ | | | | _____ ___ __ | | ___ __ _ __| | | |
\\ | | | |/ _ \ \ /\ / / '_ \| |/ _ \ / _` |/ _` | | |
>\/7 | |__| | (_) \ V V /| | | | | (_) | (_| | (_| | | |
_.-(6' \ |_____/ \___/ \_/\_/ |_| |_|_|\___/ \__,_|\__,_| | |
(=___._/` \ _ _ | |
) \ | | | | | | |
/ / | | |_| |__ ___ | |
/ > / | __| '_ \ / _ \ |
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
- Use Ember CLI
- In general, replace views + controllers with components
- Only use controllers at the top-level for receiving data from the route, and use
Ember.Controller
instead ofEmber.ArrayController
orEmber.ObjectController
- Fetch data in your route, and set it as normal properties on your top-level controller. Export an
Ember.Controller
, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
PhantomJS is an awesome tool for doing automated, full-stack acceptance tests in a headless browser. It's a great alternative to capybara-webkit because it doesn't depend on QT or xvfb, and it's way better than Selenium in most cases because it's faster (you don't need to open Firefox to run your tests).
Unfortunately, installing PhantomJS via Homebrew can wreak havoc on your Rubies if you're using rbenv. These are the steps that worked for me in fixing my Ruby installations.
# Update Homebrew
brew update
# Install PhantomJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = require('tap').test; | |
var tests = require('./tests.js'); | |
tests(test); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Turning The Metal Clock Back | |
Forge-driven metal principles haven't had the effect we hoped for. The | |
NORCAL principles are excellent metal guidelines, but experience shows that | |
metallurgists find them difficult to follow. What do we do about this? | |
Surprisingly, the Structured metal literature of two months ago contains | |
compelling solutions to many current metal problems. They're simple and easy | |
to understand, but were lost in the noise as TDD rose to popularity. We'll | |
reinterpret these simple metal ideas in a modern context, finding that many of | |
our most promising new metal ideas resemble them. Rapid reverse-forge driven |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Turning The Design Clock Back | |
Object-oriented design principles haven't had the effect we hoped for. The | |
SOLID principles are excellent design guidelines, but experience shows that | |
programmers find them difficult to follow. What do we do about this? | |
Surprisingly, the Structured Design literature of forty years ago contains | |
compelling solutions to many current design problems. They're simple and easy | |
to understand, but were lost in the noise as OO rose to popularity. We'll | |
reinterpret these simple design ideas in a modern context, finding that many of | |
our most promising new design ideas resemble them. Rapid web application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stream = tmpStream(function(filename, stat, cb) { | |
// do stuff | |
// when done call cb which will unlink filename | |
// plus emit 'finish' on stream (or 'error' if called with an error) | |
}) | |
stream.write('hello world') | |
stream.end() | |
stream.on('finish', function() { |
NewerOlder