Skip to content

Instantly share code, notes, and snippets.

View claudiainbytes's full-sized avatar
😺
I build awesome digital stuff

Claudia Estupiñán Forero claudiainbytes

😺
I build awesome digital stuff
View GitHub Profile
<!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">
@claudiainbytes
claudiainbytes / gist:bc1f3f9e21e80f488c0518f8c480553f
Last active February 4, 2018 19:18
SSL certificates: Subject alternative names (SAN) solution for XAMPP
#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
@claudiainbytes
claudiainbytes / gist:1407f3ed15df9e9823758d4a96ecf6d6
Last active February 10, 2019 11:59
openssl for mac osx xampp
#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"
####### 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
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];
@claudiainbytes
claudiainbytes / rAF.js
Last active November 27, 2017 16:56 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
// 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'];
* {
/*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;
public function handle($request, Closure $next)
{
return $next($request)
->header('Access-Control-Allow-Origin', '*')
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
}
@claudiainbytes
claudiainbytes / gist:aa01d2e321a9d1db677f541e0dcaeec7
Last active September 6, 2017 18:58
customizing jquery form validator cedula and telephone
$.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;
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",