Skip to content

Instantly share code, notes, and snippets.

View johnsi15's full-sized avatar
🤖
Web technology lover 👨‍💻

John Serrano johnsi15

🤖
Web technology lover 👨‍💻
View GitHub Profile
@johnsi15
johnsi15 / Funciones JavaScript
Last active July 1, 2017 03:30
Formas de crear funciones en JavaScript
let base = 5;
let height = 10;
// Escapando concatenacion con comillas nueva formas de concatenar contenido
// console.log(`Hola mundo ${base * height / 2}`);
// Funcion normal Forma #1
// function areaTriangulo(base, height){
// return base * height / 2;
// }
@johnsi15
johnsi15 / Comandos git
Created June 18, 2016 14:56
Comandos básicos de git
git add .
git commit -m "comentario"
//El git pull para bajar cambios
git pull origin master
------------------------------
//El git push para enviar
git push origin master
@johnsi15
johnsi15 / mysqli
Last active June 17, 2016 15:35
Este código realiza una conexión a una base de datos sqli con php
<?php
$bd = new mysqli("localhost","root","andrey15","agenda");
if($bd->connect_errno){
echo "Error en la conexion..";
}else{
echo "Conexion exitosa...<br>";
echo $bd->host_info;
}
/* //para registrar datos....
@yesidays
yesidays / upload.js
Created May 3, 2012 04:44
Upload with Node.js
var http = require('http'),
util = require('util'),
formidable = require('formidable'),
server;
server = http.createServer(function(req, res) {
if (req.url == '/') {
res.writeHead(200, {'content-type': 'text/html'});
res.end(
"<div align='center'>"+