This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="container" id="app"> | |
<div class="row"> |
This file contains hidden or 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
#https://gist.github.com/nrollr/4daba07c67adcb30693e | |
1. Make a directory called xamppcerts in etc folder | |
mkdir xamppcerts | |
2. Create the following file called localhost.conf | |
[req] | |
default_bits = 1024 |
This file contains hidden or 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
#open ssl | |
sudo openssl genrsa -out localhost.key 2048 | |
sudo openssl req -new -x509 -key localhost.key -out localhost.crt -days 3650 -subj /CN=localhost | |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain localhost.crt | |
... | |
#http-ssl.conf | |
SSLCertificateFile "/Applications/XAMPP/xamppfiles/etc/localhost.crt" | |
#SSLCertificateFile "/Applications/XAMPP/xamppfiles/etc/ssl.crt/server.crt" | |
.... | |
SSLCertificateKeyFile "/Applications/XAMPP/xamppfiles/etc/localhost.key" |
This file contains hidden or 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
####### Apache Installation | |
sudo apachectl stop | |
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null | |
brew install httpd | |
#Now we just need to configure things so that our new Apache server is auto-started | |
sudo brew services start httpd | |
#You can see Apache running on the browser by default http://localhost:8080 |
This file contains hidden or 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
function Jugador(nombre, arma){ | |
this.nombre = nombre; | |
this.puntaje = 0; | |
this.arma = arma; | |
} | |
Jugador.prototype.setArma = function() { | |
let armas = ["Piedra","Papel","Tijera"]; | |
let aleatorio = Math.floor(Math.random() * (armas.length )); | |
this.arma = armas[aleatorio]; |
This file contains hidden or 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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains hidden or 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
* { | |
/*border: 1px solid red !important;*/ | |
font-family: 'Lato', sans-serif; | |
} | |
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; |
This file contains hidden or 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
public function handle($request, Closure $next) | |
{ | |
return $next($request) | |
->header('Access-Control-Allow-Origin', '*') | |
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS'); | |
} |
This file contains hidden or 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
$.validate({modules : 'date, security', lang: 'es'}); | |
// Add validator | |
$.formUtils.addValidator({ | |
name : 'cedula', | |
validatorFunction : function(value, $el, config, language, $form) { | |
var patt = new RegExp("^[0-9]+$"); | |
if( value.length > 7 && value.length < 13 && patt.test(value) ){ | |
return true; | |
} else { | |
return false; |
This file contains hidden or 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 projects = { | |
"projects": [ | |
{ | |
"title": "Sandwich Qbano", | |
"dates": "2011", | |
"description": "Concurso Música en Altamar", | |
"images": ["11-img-large.jpg", "11-img-small.jpg"] | |
}, | |
{ | |
"title": "Sweet Lemon", |