[]
brackets()
parentheses, round brackets{}
curly braces<>
chevrons, angle brackets;
semi-colon:
colon.
period, dot,
comma
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
<?php | |
/* From => http://www.rarst.net/wordpress/debug-wordpress-hooks/ */ | |
function dump_hook( $tag, $hook ) { | |
ksort($hook); | |
echo "<pre>>>>>>\t$tag<br>"; | |
foreach( $hook as $priority => $functions ) { |
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
#!/usr/bin/env bash | |
# Config Variables | |
args=("$@") | |
SUBDOMAIN_KEY=${args[0]} | |
source ../site/.env | |
sudo sh -c "echo '192.168.50.5 $SUBDOMAIN_KEY.$DOMAIN_CURRENT_SITE' >> /etc/hosts" |
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 buttons = document.querySelectorAll(".fbProfileBrowserListItem .uiButton") | |
for (var i=0; i<buttons.length; i++) { | |
$(buttons[i]).click(); | |
} |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Document</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap --> |
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
/* ---- endpoints API ---- */ | |
function disableAllEndpoints( $endpoints ){ | |
foreach ($endpoints as $clave => $valor) { | |
unset( $endpoints[$clave] ); | |
} | |
return $endpoints; | |
} |
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 fibonacciNth ( position ) { | |
switch (position) { | |
case 0: | |
return -1; | |
case 1: | |
return 0; | |
case 2: | |
return 1; | |
default: | |
return fibonacciNth(position-1)+fibonacciNth(position-2); |
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
curl -v -u USERNAME -X POST https://api.github.com/authorizations --data "{\"scopes\":[\"gist\"], \"note\": \"SublimeText 2/3 Gist plugin\"}" |
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 guidMaker(){ | |
function generator() { | |
const S4 = () => (((1+Math.random())*0x10000)|0).toString(16).substring(1); | |
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()); | |
} | |
const done = false; | |
let generated = 0; |
The symbol is a new primitive type, a unique token that is guaranteed never to clash with another symbol → a kind of UUID (Universally Unique Identifier)
ES2015 symbols are values, but they’re not strings. They’re not objects. They’re something new: a seventh type of value.
The primary reason for the introduction of symbols seems to have been to facilitate adding new functionality to the language without breaking existing code (hidden and unique properties)
Con los symbol
podemos añadir propiedades ocultas y unicas a los objetos que nos permiten extender objetos facilmente.