View sublime-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_style": "smooth", | |
"color_scheme": "Packages/Oceanic Color Scheme/Themes/Oceanic.tmTheme", | |
"fade_fold_buttons": false, | |
"font_face": "Monaco", | |
"font_size": 14, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, |
View server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Server.js | |
* @author : DiganmeGiovanni | https://twitter.com/DiganmeGiovanni | |
* @Created on: 25 Oct, 2014 | |
*/ | |
/* Librerias necesarias para la aplicación */ | |
var app = require('express')(); | |
var http = require('http').Server(app); | |
var io = require('socket.io')(http); |
View chat.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Chat room</title> | |
</head> | |
<body> | |
<h3>Messages:</h3> | |
<ul id="list-msgs"> | |
View chat.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Chat room</title> | |
<link rel="stylesheet" href="css/normalize.css"> | |
<link rel="stylesheet" href="css/foundation.min.css"> | |
</head> | |
<body> |
View signup.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Signup to chat team SS</title> | |
</head> | |
<body> | |
<h1> Signup to chat team SS</h1> | |
<form id="signup-form"> | |
<label for="username">Username</label><br> |
View UsersDAO.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Util para encriptar el password del usuario */ | |
var bcrypt = require('bcrypt-nodejs'); | |
/** | |
* Data Access Object (DAO) para 'users', | |
* Debe ser construido con un objeto conectado a la | |
* base de datos | |
*/ | |
function UserDAO(db) { |
View server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Server.js | |
* @author : DiganmeGiovanni | https://twitter.com/DiganmeGiovanni | |
* @Created on: 25 Oct, 2014 | |
*/ | |
/* Librerias necesarias para la aplicación */ | |
var bodyParser = require('body-parser'); | |
var express = require('express'); |
View VBAConnToAccess.vba
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub DBGetUsers() | |
Dim DBLearningVBA As Database | |
Dim RSUsers As Recordset | |
Dim dbPath As String | |
Dim dbName As String | |
dbPath = "C:\Users\Giovanni\Documents\" | |
dbName = "LearningVBA.mdb" | |
Set DBLearningVBA = OpenDatabase(dbPath & dbName) 'Open database |
View 2DGeoSpatialMongoQuery.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Search all places in 'stores' collection that be 'near' of a given | |
* coordinates within a max distance of 2000 meters. collection 'stores' | |
* has a 2DSphere index on 'location' | |
*/ | |
db.stores.find({ | |
location: { | |
$near: { | |
$geometry: { | |
type: "Point", |
View mongodb_init_replica.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* We should config the replica after start the 3 servers | |
* run this with a command like: | |
* mongo --port 27017 < mongodb_init_replica.js | |
*/ | |
config = { _id: "m101", members:[ | |
{ _id : 0, host : "localhost:27017"}, | |
{ _id : 1, host : "localhost:27018"}, | |
{ _id : 2, host : "localhost:27019"} ] |
OlderNewer