Use the diff
code highlighting tag.
```diff
- foo
+ bar
Example:
app.factory('NormalizedPosts', function($firebaseArray, userCache) { | |
var PostsWithUsers = $firebaseArray.$extend({ | |
// override $$added to include users | |
$$added: function(snap) { | |
// call the super method | |
var record = $firebaseArray.prototype.$$added.call(this, snap); | |
userCache.$load( record.user ).$loaded(function( userData ) { | |
record.userData = userData; | |
}); |
{ | |
"name": "my-app", | |
"version": "1.0.0", | |
"description": "My test app", | |
"main": "src/js/index.js", | |
"scripts": { | |
"jshint:dist": "jshint src/js/*.js", | |
"jshint": "npm run jshint:dist", | |
"jscs": "jscs src/*.js", | |
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |
#!/bin/sh | |
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264 | |
if [ "`/usr/bin/whoami`" != "root" ]; then | |
echo "You need to execute this script as root." | |
exit 1 | |
fi | |
cat > /etc/yum.repos.d/centos.repo<<EOF |
(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.
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |