Skip to content

Instantly share code, notes, and snippets.

@leommoore
leommoore / testing_overview.md
Last active October 2, 2015 22:58
Testing - Overview

#Testing - Overview

Security TestingSecurity vulnerabilities
TypeWhat to Test
United TestingModel
Functional TestingControllers/Views, requests
Integration TestingUser stories, sequences of request
Performange TestingHow fast are the requests handled
Load TestingHow many requests can be handled
@leommoore
leommoore / node_testing_mocha.markdown
Last active October 4, 2015 08:08
Node - Mocha Testing
@leommoore
leommoore / node_basic_web_service.markdown
Last active October 4, 2015 10:28
Node - Basic Web Service

##Node - Basic Web Service

var util = require('util'),
http = require('http');

/*
/add/2/2 => 4
/sub/103/42 => 61
/mul/3/2 => 6
@leommoore
leommoore / nginx_basics.md
Last active March 2, 2024 01:13
Nginx Basics

#Nginx Basics for Ubuntu

Please see http://wiki.nginx.org/Main for more information. See http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ for a tutorial on how to install Nginx.

##Installation To install, you can install the version which is in the standard Ubuntu repositories but it is normally quite old and will not have the latest security patches. The best way is to update the repositories first:

apt-get update
apt-get install python-software-properties

apt-get upgrade

@leommoore
leommoore / gist:3249441
Created August 3, 2012 16:53
Coffeescript Basics

##CoffeeScript Basics

###Basic Command Line Functions

Creates test.js from test.coffee file

$ coffee -c test.coffee

Every time test.coffee is updated re-compile

@leommoore
leommoore / mongodb_basics.markdown
Last active October 8, 2015 07:38
MongoDB Basics

#MongoDB Basics

This is a really useful link to update the default mongodb updated to the latest version

http://askubuntu.com/questions/147135/how-can-i-uninstall-mongodb-and-reinstall-the-latest-version

Basic Commands:

@leommoore
leommoore / node_using_command_line_parameters.markdown
Last active October 8, 2015 13:17
Node - Using Command Line Parameters

#Node - Using Command Line Parameters

//run from shell - node ls.js .
console.log('Param1: ' + process.argv[0]); // Node
console.log('Param2: ' + process.argv[1]); // ls.js
console.log('Param3: ' + process.argv[2]); // .        - current directory
console.log('---------------------------------------------------'); 
var fs = require('fs');
@leommoore
leommoore / clearfix.css
Created September 2, 2012 12:51
Clearfix for fixing float/clear problem in css
/* clearfix */
.group:before,
.group:after {
content: "";
display: table;
}
.group:after {
clear: both;
}
@leommoore
leommoore / mongodb_connection_refused.markdown
Last active October 11, 2015 07:48
MongoDB Connection Refused

#MongoDB Connection Refused

If you come across a connection refused when trying to connect to MongoDB try deleting the file:

/var/lib/mongodb/mongod.lock

You will need to use sudo to delete it.