[x] lol
[ ] k
| import sane from 'sane'; | |
| import { resolve as resolvePath } from 'path'; | |
| import { spawn, fork } from 'child_process'; | |
| import { existsSync as fileExists} from 'fs'; | |
| import { | |
| red, green, yellow, blue, | |
| magenta, cyan, white, gray | |
| } from 'chalk'; | |
| process.env.PATH += ':./node_modules/.bin'; |
| // Start with a webdriver instance: | |
| var | |
| baseUrl = 'localhost:8080', | |
| chai = require('chai'), | |
| assert = chai.assert, | |
| expect = chai.expect, | |
| should = chai.should(), | |
| chaiWebdriver = require('chai-webdriver'), | |
| request = require('supertest')(baseUrl), | |
| sw = require('selenium-webdriver'), |
| # Created by .ignore support plugin (hsz.mobi) | |
| ### Linux template | |
| *~ | |
| # KDE directory preferences | |
| .directory | |
| # Linux trash folder which might appear on any partition or disk | |
| .Trash-* | |
| ### JetBrains template |
| ########## Web Application Development for BASH made easy | |
| # This shell script contains a collection of excellent scripts I've found over the years that enhance development. | |
| # It is organized much like a traditional etc/*conf file, and I hope others find it useful. | |
| # | |
| # YOU MUST HAVE X-CODE installed | |
| # | |
| # Features include: | |
| # - Homebrew | |
| # - Sexy git bash status prompt | |
| # - NodeJS Version Manager (nvm) |
No fuss, no Muss.
Everytime I set up a new ubuntu 14.04 server and I want nodejs globally installed I have to go hunting.
So this just fixes everything.
# hope you ran with sudo
sudo apt-get update| #/bin!bash | |
| HOST="http://127.0.0.1:5984" | |
| curl -X PUT $HOST/registry | |
| curl -X PUT $HOST/_config/admins/$1 -d '"$2"' | |
| npm start --npm-registry-couchapp:couch=http://$1:$2@localhost:5984/registry |
| // This hidden gem was found at http://stackoverflow.com/questions/9865804/proper-way-to-sort-a-backbone-js-collection-on-the-fly (buried in the answers) | |
| // Following example above do in the view: | |
| // Assign new comparator | |
| this.collection.comparator = function( model ) { | |
| return model.get( 'lastname' ); | |
| } | |
| // Resort collection | |
| this.collection.sort(); |