Skip to content

Instantly share code, notes, and snippets.

Alberto Galiana alber999

  • Fon
  • Madrid, Spain
Block or report user

Report or block alber999

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alber999
alber999 / index.php
Created Jan 27, 2016
Sample of Silex
View index.php
<?php
/*
* Silex
*
* {
* "require": {
* "silex/silex": "~1.3"
* }
* }
*/
@alber999
alber999 / Servlet.java
Last active Jan 27, 2016
Sample of Java servlet
View Servlet.java
/*
* Java servlet
*
* Edit "/var/lib/[tomcat]/webapps/ROOT/WEB-INF/web.xml"
*
* <?xml version="1.0" encoding="UTF-8"?>
* <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
* xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
* http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
@alber999
alber999 / server.go
Created Jan 27, 2016
Sample of Golang server
View server.go
/*
* Golang server
*/
package main
import (
"io"
"net/http"
)
@alber999
alber999 / index.js
Last active Jan 27, 2016
Sample of NodeJS as a cluster
View index.js
/*
* Cluster NodeJS
*/
var cluster = require('cluster');
if (cluster.isMaster) {
var cpuCount = require('os').cpus().length;
@alber999
alber999 / app.js
Created Jan 27, 2016
Sample of NodeJS as a cluster + Express + Hogan
View app.js
/*
* Cluster NodeJS + Express + Hogan
*
* "dependencies": {
* "express": "~4.13.3",
* "hogan-middleware": "*"
* }
*/
var cluster = require('cluster');
You can’t perform that action at this time.