Skip to content

Instantly share code, notes, and snippets.

View Mfernandezmontes's full-sized avatar

Manuel Fernandez-Montes Mfernandezmontes

View GitHub Profile
d
@Mfernandezmontes
Mfernandezmontes / mongodb.md
Last active August 29, 2015 14:24
MongoDB

MongoDB

Introducción

Es una base de datos orientada a documentos, en la cual se guardan documentos BSON, que tiene una sintaxis igual qu un documento JSON, La difrencia entre ambos es la capacidad de codificacioón en binario, lo cual en mongodb le da la capacidad de guardar indices

{"employees":[
    {"firstName":"John", "lastName":"Doe"},
    {"firstName":"Anna", "lastName":"Smith"},
 {"firstName":"Peter", "lastName":"Jones"}
# NPM CheatSheet.
# Super easy intall: npm comes with node now.
# To create your own npm package: https://www.npmjs.org/doc/misc/npm-developers.html
# More: https://www.npmjs.org/doc/
# 1. NPM Command Lines.
# Local mode is the default.
# Use --global or -g on any command to operate in global mode instead.
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
// Date Object CheatSheet
// The Date object is used to work with dates and times.
// More: http://www.w3schools.com/jsref/jsref_obj_date.asp
// 1. Instantiating a Date.
var date = new Date();
var date = new Date(milliseconds);
Handlebars is a semantic web template system, started by Yehuda Katz in 2010.
Handlebars.js is a superset of Mustache, and can render Mustache templates in addition to Handlebars templates.
More: http://handlebarsjs.com/
1. Expressions.
1.1 Basic usage.
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.