- Some utilities:
sudo apt-get install vim tmux git curl
- Copy/paste from the command line:
sudo apt-get install xclip
-- Todos los artículos de 'RAFA' primero ordenados por serial y luego el resto de artículos ordenados igualmente por serial. | |
SELECT a.* FROM articulos a LEFT JOIN (SELECT 'RAFA' COLLATE utf8mb4_general_ci AS nombre) r on r.nombre = a.usuario | |
ORDER BY r.nombre DESC, serial |
Its relatively easy to stub in support for new services using their sdks. I have an application I'm trying this service out with and have stubbed rudimentary support for this service.
Just fetch this library locally, install the deps and npm link it.
The service definition is really woefully incomplete with only input parameters specified for 'createStream','describeStream','getNextRecords','getShardIterator','listStreams' and 'putRecord' - you'll have to add the parameters for the other operations yourself if needed. I didn't waste too much time doing this cause I'm pretty sure this stuff just gets automagically generated from a service defin
var window; | |
if (typeof window === "undefined" || window === null) { | |
window = {}; | |
} | |
if (typeof jQuery === "undefined" || jQuery === null) { | |
global.$ = require('jquery'); | |
} |
// 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 |
'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; |
MAX_THREADS = 5 | |
delay = 0.5 | |
import psycopg2 | |
import re | |
import sys | |
import time | |
import threading | |
import urllib2 | |
import urlparse |
var net = require('net'); | |
var clients = []; | |
net.createServer(function (socket) { | |
clients.push(socket); | |
socket.on('data', function (data) { | |
broadcast(data, socket); | |
}); |
#How you get Sail.js running on Openshift#
This instruction is tested with:
###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.