- http://ponyfoo.com/
- http://www.2ality.com/ (acá aprendí ECMAScript 6)
- http://addyosmani.com/blog
- http://rmurphey.com/
- https://alexsexton.com/
- http://carlosazaustre.es/blog/
- http://christianheilmann.com/
- http://dailyjs.com/ (este junta articulos muy buenos de otros blogs, muy bueno para conocer más blogs de a poco)
- http://davidwalsh.name/
- http://ariya.ofilabs.com/
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 | |
/* | |
RFC Regex by Jack | |
Valid: | |
JACK880229AA1 | |
JACK880229 | |
Invalid: | |
JACK880230AA1 | |
JACK890229AA1 |
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
// data from https://gist.github.com/andyj/7108917 | |
$array = [ | |
'44' => 'UK (+44)', | |
'1' => 'USA (+1)', | |
'213' => 'Algeria (+213)', | |
'376' => 'Andorra (+376)', | |
'244' => 'Angola (+244)', | |
'1264' => 'Anguilla (+1264)', | |
'1268' => 'Antigua & Barbuda (+1268)', |
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
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/roboto.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/material-fullpalette.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/css/ripples.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/js/material.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.3.0/js/ripples.min.js"></script> |
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 | |
/* PHP Headers for CSV File with UTF-8 - By MrJack*/ | |
header("Content-type: text/csv"); | |
header("Content-Disposition: attachment; filename=reporte_ganadores_".date("d-m-Y").".csv"); | |
header("Pragma: no-cache"); | |
header("Expires: 0"); | |
echo "\xEF\xBB\xBF"; //<--- here is the magic | |
echo "WHATÉVER"; |
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 | |
$key = "<API Key>"; | |
$from = "[email protected]"; | |
$to = "[email protected]"; | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
if(isset($_POST['timestamp']) && isset($_POST['token']) && isset($_POST['signature']) && hash_hmac('sha256', $_POST['timestamp'] . $_POST['token'], $key) === $_POST['signature']) | |
{ | |
if($_POST['event'] == 'complained') { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bootstrap 3 Template</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Bootstrap core CSS --> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" media="screen"> | |
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> |
#Deploy de un sitio web estático en heroku
Supongamos que tienes un archivo index.html con contenido estatico. Renombralo a home.html.
Crea index.php y agrega la siguiente linea:
<?php include_once("home.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
<?php | |
/* Regex generator for valid TLDs - By MrJack*/ | |
$txt = file_get_contents('http://data.iana.org/TLD/tlds-alpha-by-domain.txt'); | |
$tlds = preg_split('/\s+/', $txt); | |
$valid_tld = array(); | |
foreach($tlds as $tld){ | |
if (! preg_match('/[^a-z]+/i', $tld, $matches)){ | |
if(strlen($tld) > 3){ | |
array_push($valid_tld, strtolower($tld)); | |
} |
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 | |
$sites = "http://www.broadcastsolutions.com.au/ | |
http://www.kvm.com.au/ | |
http://www.ambertech.com.au/"; | |
$sites = preg_split('/\r\n|\r|\n/', $sites); | |
echo " |