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
var express = require('express'), | |
url = require('url'), | |
path = require('path'), app = module.exports = express(); | |
app.engine('.html', require('ejs').__express); | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'html'); | |
var menu = [ | |
{titulo : 'Sobre Nosotros', link : 'about'} | |
]; |
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
<?php | |
/** | |
* @author "Jesus Perez @jsstoni19" | |
* @package anco | |
* @subpackage newSql | |
* @copyright Free | |
* @version anco 1.1 | |
*/ | |
abstract class newSql { | |
private static $host = 'localhost'; |
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
var io = require("socket.io")(); | |
io.on('connection', function(socket) { | |
socket.on('evento', function(data) { | |
console.log(data.nombre); | |
}); | |
}); | |
io.listen(1515); |
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
@ECHO OFF | |
cd folder | |
forever start ./ | |
exit |
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
const express = require('express') | |
const app = module.exports = express() | |
const path = require('path') | |
const port = process.env.PORT || 8080 | |
const fs = require('fs') | |
const bodyParser = require('body-parser') | |
const multipart = require('connect-multiparty') | |
app.set("view options", {layout: false}) | |
//configurar una ruta de nuestros archivos 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
var stringCut = function (str, limit) { | |
//str = string texto para acortar | |
//limit = limite de lineas para mostrar | |
limit = limit || 10; | |
var separe = str.split(/\n/g); | |
return separe.slice(0, limit).join(''); | |
} |
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
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'me', | |
password : 'secret', | |
database : 'my_db' | |
}); | |
connection.connect(); |
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
var mysql = require('mysql'); | |
var pool = mysql.createPool({ | |
connectionLimit : 10, | |
host : 'example.org', | |
user : 'bob', | |
password : 'secret', | |
database : 'my_db' | |
}); | |
pool.query('SELECT 1 + 1 AS solution', function(err, rows, fields) { |
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
<?php | |
$totalMostrar = 6; | |
$empieza = 1; | |
$restos = $empieza % $totalMostrar; | |
$mostrar = array('...'); | |
for($i = 0; $i < count($mostrar); $i++){ | |
if($restos == 1) -> //open | |
if($restos == 0) -> //close | |
$empieza++ | |
} |
OlderNewer