Skip to content

Instantly share code, notes, and snippets.

View ramingar's full-sized avatar
:octocat:
Not a PRO user

Rafael Minguet ramingar

:octocat:
Not a PRO user
View GitHub Profile
@ramingar
ramingar / window-open-native-app.html
Last active August 26, 2015 07:49
Función para abrir una aplicación nativa desde phonegap #phonegap #angular #window #open #native #window.open
<script>
// At the controller:
$scope.redirectToSystemApp = function (url, protocol) {
if (typeof protocol == 'undefined') {
window.open(encodeURI(url), '_system', 'location=yes');
preventDefault();
} else {
window.open(protocol + ':' + url, '_system');
}
};
@ramingar
ramingar / esb-definition.md
Last active August 29, 2015 14:22
Definición de ESB #esb #definicion

Un bus de servicio de empresa (ESB) es un combinado de arquitectura de software (¿normalmente middlewares?) que proporciona servicios fundamentales para arquitecturas complejas a través de un sistema de mensajes (el bus) basado en normas reconocidas y que responde a eventos.

  • Modelo de arquitectura usado para diseñar e implementar comunicación entre software que interactúa mutuamente entre sí en un SOA.
  • ¿Qué hace un ESB?
    • Monitoriza y controla el enrutado de una petición al servicio de respuesta. (Intercambio de mensajes de servicios).
    • Resuelve los conflictos de comunicación entre servicios.
  • Controla el deployment y el control de versiones de los servicios.
@ramingar
ramingar / bpm-engine-definition.md
Last active August 29, 2015 14:22
Definición de motor de BPM #bpm-engine #bpm #motor-bpm #definicion

NOTA: La gestión de procesos de negocio (BPM, Business Process Management) es una metodología para la optimización de procesos. El BPM es el entendimiento, visibilidad y control de los procesos de negocio de una organización.

NOTA: Un proceso de negocio representa una serie discreta de actividades o pasos de tareas.

Un motor de BPM es una aplicación de software que gestiona y ejecuta procesos de negocio. Controla y monitoriza el estado de las actividades en un flujo de trabajo (e.g. aprobar un préstamo, enviar un email de recordatorio, etc.)

@ramingar
ramingar / richardson-maturity-model.md
Last active August 29, 2015 14:22
The Richardson Maturity Model - Niveles de maduración de REST #rest #definicion

The Richardson Maturity Model

  • Level 0: The Swamp of POX (Plain Old XML).
    • Static hypermedia application, consisting of a set of static Web pages containing nothing but HTML, interconnected by links. Not particularly agile. Is it REST? Yes, but in a very simplistic way.
  • Level 1: Resources.
    • Hypermedia application consisting of static Web pages that contain HTML and client-side JavaScript (no funky Ajax or the like). Pages link to each other, and the links may be dynamic, based on client-side logic in the JavaScript.
  • Level 2: HTTP Verbs.
    • Hypermedia application consisting of dynamic Web pages built on the fly on the Web server, using php or Java Server Pages or whatever server scripting environment floats your boat. Pages link to each other, but the links may be dynamic, based on server-side logic.
  • Level 3: Hypermedia Controls.
  • Hypermedia application consisting of a set of dynamic representations that conform to a variety of media types (HTML documents, XML documents, ima
@ramingar
ramingar / aws-eb-getting-started.md
Last active August 29, 2015 14:22
Getting Started with the EB CLI - Empieza con EB CLI #aws #eb #eb-cli #getting-started

Getting started with the EB CLI

Set up your directory with EB CLI.

eb init -p node.js --profile rafeta

Create the environment dev-env and deploy the sample application.

eb create dev-env

@ramingar
ramingar / mocha-coverage-istanbul.md
Created June 9, 2015 11:32
Run tests - Ejecutar tests en Node.js #node #nodejs #tests #mocha #coverage #istanbul

Instala las herramientas de testing:

npm install --save-dev mocha should istanbul

Crear los tests en /test:

describe ( 'When you run this application in AWS, you', function () {
  it('should have set your region defined as AWS region', function () {
    AWS.config.region.should.equal(awsRegion);
 });
@ramingar
ramingar / extract-tar-gz.md
Created June 22, 2015 19:28
Descomprimir un .tar.gz #tar #gunzip
tar xvzf file-name.tar.gz
@ramingar
ramingar / redis-data-types-string.md
Last active August 29, 2015 14:23
Redis data types (string) #redis #comandos #string
> set mykey somevalue
OK
> get mykey
"somevalue"

Multiple set o get (MSET and MGET commands) (for reduced latency):

> mset a 10 b 20 c 30
@ramingar
ramingar / redis-data-types-lists.md
Last active August 29, 2015 14:23
Redis data types (lists) #redis #comandos #lists

LPUSH (adds on the left (at the head)), RPUSH (on the right (at the tail)), LRANGE (extracts ranges of elements from lists). Note that LRANGE takes two indexes, the first and the last element of the range to return. Both the indexes can be negative, telling Redis to start counting from the end: so -1 is the last element, -2 is the penultimate element of the list, and so forth.:

> rpush mylist A
(integer) 1
> rpush mylist B
(integer) 2
> lpush mylist first
(integer) 3
> lrange mylist 0 -1