Skip to content

Instantly share code, notes, and snippets.

View vicneanschi's full-sized avatar

Valeri Vicneanschi vicneanschi

  • Montreal, Canada
View GitHub Profile
@vicneanschi
vicneanschi / Tools
Last active August 29, 2015 14:21
Tools
Version control systems:
-----------------------
Git
http://git-scm.com/
SVN
TFS
Link Shell Extension http://download.cnet.com/Link-Shell-Extension-64-bit/3000-2248_4-75213087.html
@vicneanschi
vicneanschi / SoapUI code snippets.groovy
Last active January 22, 2016 19:12
SoapUI code snippets
///////////////
//Get and Set properties
//////////////
// get properties from testCase, testSuite and project
def testCaseProperty = testRunner.testCase.getPropertyValue( "MyProp" )
def testSuiteProperty = testRunner.testCase.testSuite.getPropertyValue( "MyProp" )
def projectProperty = testRunner.testCase.testSuite.project.getPropertyValue( "MyProp" )
def globalProperty = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "MyProp" )
@vicneanschi
vicneanschi / boot2docker.sh
Last active August 29, 2015 14:22
Docker
$ boot2docker --help
# Create VM
$ boot2docker init
# Start VM
$ boot2docker start
# Gracefully shutdown the VM
$ boot2docker stop
# create DB
r.dbCreate("blog").
# create table
r.db('test').tableCreate('authors')
# insert
r.table('authors').insert(JSON)
# get all documents from table
@vicneanschi
vicneanschi / NodeJS.md
Last active November 11, 2015 15:00
NodeJS

Debug

node-debug server.js --run --debug --loglevel=debug --cart_init_debug

node-debug --debug-brk server/Runners/Javascript/javascript_cartridge_runner.js root/x2o.Todo.cartridge --debug

NPM

Package file format

https://docs.npmjs.com/files/package.json

Check for outdated, incorrect, and unused dependencies.

"C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.3\sbin\rabbitmq-plugins" enable rabbitmq_management
"C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.3\sbin\rabbitmq-plugins" enable rabbitmq_consistent_hash_exchange
$ docker --help
# list of running containers
$ docker ps
$ docker images
$ docker pull <image>
# Expose container port 8080 as external port 8088
// send to current request socket client
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.sockets.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
// Collection save
Backbone.Collection.prototype.save = function (options) {
// create a tmp collection, with the changed models, and the url
var tmpCollection = new Backbone.Collection( this.changed() );
tmpCollection.url = this.url;
// sync
Backbone.sync("create", tmpCollection, options);
};
Backbone.Collection.prototype.changed = function (options) {
@vicneanschi
vicneanschi / Nodemon.sh
Created August 5, 2015 14:17
Automatically restart node server on file change
nodemon --watch cartridges server.js --run --loglevel=debug --debug