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
function validaRut(campo){ | |
if ( campo.length == 0 ){ return false; } | |
if ( campo.length < 8 ){ return false; } | |
campo = campo.replace('-','') | |
campo = campo.replace(/\./g,'') | |
var suma = 0; | |
var caracteres = "1234567890kK"; | |
var contador = 0; |
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
function number_format(amount, decimals) { | |
amount += ''; // por si pasan un numero en vez de un string | |
amount = parseFloat(amount.replace(/[^0-9\.]/g, '')); // elimino cualquier cosa que no sea numero o punto | |
decimals = decimals || 0; // por si la variable no fue fue pasada | |
// si no es un numero o es igual a cero retorno el mismo cero | |
if (isNaN(amount) || amount === 0) | |
return parseFloat(0).toFixed(decimals); |
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
/^(\+?56)?(\s?)(0?9)(\s?)[98765432]\d{7}$/ |
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
# This hosts file is brought to you by Dan Pollock and can be found at | |
# http://someonewhocares.org/hosts/ | |
# You are free to copy and distribute this file for non-commercial uses, | |
# as long the original URL and attribution is included. | |
#<localhost> | |
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
255.255.255.255 broadcasthost | |
::1 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
// ParsleyConfig definition if not already set | |
window.ParsleyConfig = window.ParsleyConfig || {}; | |
window.ParsleyConfig.i18n = window.ParsleyConfig.i18n || {}; | |
window.ParsleyConfig.i18n.es = $.extend(window.ParsleyConfig.i18n.es || {}, { | |
defaultMessage: "Este valor parece ser inválido.", | |
type: { | |
email: "Ingrese un email válido.", | |
url: "Ingrese una URL válida.", | |
number: "Ingrese un número válido.", |
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
[{"key":"1920 x 1080","name":"Nexus 5 Landscape","width":1920,"height":1080}, | |
{"key":"1080 x 1920","name":"Nexus 5 Portrait","width":1080,"height":1920}, | |
{"key":"1024 x 768","name":"iPad Landscape","width":1024,"height":768}, | |
{"key":"768 x 1024","name":"iPad Portrait","width":768,"height":1024}, | |
{"key":"736 x 414","name":"iPhone 6 Plus Landscape","width":736,"height":414}, | |
{"key":"414 x 736","name":"iPhone 6 Plus Portrait","width":414,"height":736}, | |
{"key":"667 x 375","name":"iPhone 6 Landscape","width":667,"height":375}, | |
{"key":"375 x 667","name":"iPhone 6 Portrait","width":375,"height":667}, | |
{"key":"568 x 320","name":"iPhone 5/S/C Landscape","width":568,"height":320}, | |
{"key":"320 x 568","name":"iPhone 5/S/C Portrait","width":320,"height":568}, |
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 | |
if(!function_exists('config_path')) | |
{ | |
/** | |
* Return the path to config files | |
* @param null $path | |
* @return string | |
*/ | |
function config_path($path=null) |
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
# FORGE CONFIG (DOT NOT REMOVE!) | |
include forge-conf/example.com/before/*; | |
server { | |
listen 80; | |
server_name example.com; | |
root /home/forge/example.com/web; | |
# FORGE SSL (DO NOT REMOVE!) | |
# ssl_certificate; |
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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_ROOT=$1 # <-- wordpress root directory | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group |
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
#!/usr/bin/env bash | |
APACHE_USER=wwwhost | |
VHOSTS_DOMAINS=(example.com second.example.com) | |
sudo ufw allow in "OpenSSH" | |
# Install Apache | |
sudo apt-get update | |
sudo apt-get install apache2 | |
sudo nano /etc/apache2/apache2.conf # Add ServerName ... directive at bottom |
OlderNewer