Skip to content

Instantly share code, notes, and snippets.

View etsuo's full-sized avatar

J.P. Poveda etsuo

View GitHub Profile
@etsuo
etsuo / prototype.js
Last active September 3, 2015 02:00
Javascript Prototype Notes
(function() {
'use strict';
// essentially a parent "class" - these are not abstract entities
// per se that can be instantiated. However, when you call
// new Foo('some value'); then Foo is executed and what's returned
// is a new object with a copy of the values from Foo -- this
// points to the new copy of Foo...
function Foo(name) {
this.name = (name === undefined) ? 'Name was not set' : name;
@etsuo
etsuo / this.js
Created September 2, 2015 21:12
Javascript "this" behavior notes
/*************
/ Call #1 Default Binding
**************/
function foo() {
console.log( ": " + this.a );
}
// note var is dropped to make this global even when
// run with node.js that would otherwise cause the call
// site of foo to be called from within a module
@etsuo
etsuo / javascript.js
Last active January 6, 2016 18:24
Some interesting behaviors of JavaScript to master
// Throw this into a file like test.js
// then use: `node test.js` to run it
'use strict'
// Some inheritence
//******************************************************************************
// Declaring the base object
//*************************************
@etsuo
etsuo / Philip
Created February 15, 2016 01:22
var express = require('express'),
app = express(),
bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
var port = process.env.PORT || 7070;
var router = express.Router();
@etsuo
etsuo / sakuraapi-cla.md
Last active April 19, 2017 17:27
SakuraApi CLA

SakuraApi Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Jean-Pierre E. Poveda or his affiliates (“SakuraApi”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SakuraApi in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact jp@sakuraapi.com.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to SakuraApi a non-exclu

@etsuo
etsuo / docker-config.yml
Last active September 5, 2019 11:00
docker-config.yml MongoDB replica set
version: "3"
services:
mongo1:
container_name: cf_mongo1
image: mongo:latest
ports:
- "127.0.0.1:37001:27017"
networks:
- backend
command: |