- Utiliza la última versión de Node asegúrate de usar la versión
6.9.0
o mayor. - Instala NPM (generalmente viene con Node, así que no te preocupes) 😙
- Instala Angular CLI globalmente:
$ npm install @angular/cli -g
This file contains hidden or 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
namespace :deploy do | |
desc "Hot-reload God configuration for the Resque worker" | |
task :reload_god_config do | |
sudo "god stop resque" | |
sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}" | |
sudo "god start resque" | |
end | |
end | |
# append to the bottom: |
#How you get Sail.js running on Openshift#
This instruction is tested with:
- Sails.js v0.9.16
- Node.js 0.10 on Openshift ( 05 May 2014)
###1) package.json
If you use the package.json build by sails new Projectname than you have to add a few fields for openshift – so the server can start you app automatically. Sails uses Grunt to build minify css/js and so on. Openshift dont have grunt installed so you have to add this also.
- https://github.com/utatti/Front-end-Developer-Interview-Questions-And-Answers/tree/master/answers
- https://github.com/yangshun/front-end-interview-handbook
- https://github.com/utatti/Front-end-Developer-Interview-Questions-And-Answers/blob/master/answers/general-questions.md
- https://github.com/h5bp/Front-end-Developer-Interview-Questions
This file contains hidden or 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
var net = require('net'); | |
var clients = []; | |
net.createServer(function (socket) { | |
clients.push(socket); | |
socket.on('data', function (data) { | |
broadcast(data, socket); | |
}); |
This file contains hidden or 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
MAX_THREADS = 5 | |
delay = 0.5 | |
import psycopg2 | |
import re | |
import sys | |
import time | |
import threading | |
import urllib2 | |
import urlparse |
This file contains hidden or 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
'use strict'; | |
var urlLib = require('url'); | |
function UrlAdapter(urlString) { | |
this.urlObj = urlLib.parse(urlString, true); | |
// XXX remove the search property to force format() to use the query object when transforming the url object to a string | |
delete this.urlObj.search; | |
} | |
UrlAdapter.prototype.parse = urlLib.parse; |
This file contains hidden or 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
// Connect to origin db | |
use some_database; // This will be named db | |
// Connecto to destiny db2 | |
db2 = db.getSiblingDB('some_other_db'); | |
// Only if needed clean destiny collection | |
db2.some_or_other_collection.remove({}); | |
// Search all origin collection and copy each to destiny collection |
This file contains hidden or 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
var window; | |
if (typeof window === "undefined" || window === null) { | |
window = {}; | |
} | |
if (typeof jQuery === "undefined" || jQuery === null) { | |
global.$ = require('jquery'); | |
} |
NewerOlder