Creating new project with ionic framework using yeoman ionic generator:
$ mkdir my-ionic-project && cd $_
$ yo ionic
_thorcomplete() { | |
COMPREPLY=($(compgen -W "`thor list | grep thor | cut -d " " -f 2`" -- ${COMP_WORDS[COMP_CWORD]})) | |
return 0 | |
} | |
complete -o default -o nospace -F _thorcomplete thor |
[color] | |
ui = auto | |
[alias] | |
co = checkout | |
br = branch | |
ci = commit | |
st = status | |
track = !sh -c 'git checkout --track -b $1 origin/$1' - | |
f = fetch | |
fstart = !sh -c 'git push origin devel:refs/heads/features/$1 && git checkout --track -b features/$1 origin/features/$1' - |
gem install cucumber | |
mkdir project && cd project | |
npm install -g yo grunt-cli bower | |
npm install generator-angular generator-testacular | |
yo angular | |
npm install && bower install | |
bower install angular-ui | |
grunt server |
describe('Controller: TasksCtrl', function () { | |
// load the controller's module | |
beforeEach(module('yeomanAngularApp')); | |
var TasksCtrl, | |
scope, | |
tasks = { getAll: function () { | |
return [ | |
{name: 'task_1'} |
// incject | |
inject(function(_$rootScope_, _$controller_, _$q_, _$injector_) {...} | |
// when | |
when(function(){ | |
deferred.resolve({model: 'balba'}); | |
$rootScope.$digest(); | |
}) | |
function MockService() { |
result=`curl http://localhost:8090/test` | |
echo "Result is '$result'" | |
if [[ "$result" == *"false"* ]]; then | |
exit 1 | |
fi | |
exit 0 |
var customerService, deferredCustomer, sampleCustomer, | |
productService, deferredProduct, sampleProduct; | |
beforeEach(function () { | |
sampleCustomer = {name:'Bob'}; | |
customerService = { get:sinon.stub() }; | |
productService = { get:sinon.stub() }; | |
sampleProduct = { type: 'Product'} |
Creating new project with ionic framework using yeoman ionic generator:
$ mkdir my-ionic-project && cd $_
$ yo ionic
# Pull base image | |
FROM resin/rpi-raspbian:wheezy | |
MAINTAINER Nathan Racklyeft <[email protected]> | |
# Install dependencies | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
build-essential \ | |
git \ | |
python \ |
const fs = require('fs') | |
const writeStream = fs.createWriteStream('out.db') | |
const { spawn } = require('child_process'); | |
const mongodump = spawn('mongodump', ['--archive', '--db', 'databaseName']); | |
mongodump.stdout.pipe(writeStream); |