curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
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
/** | |
* ghostHunter - 0.4.0 | |
* Copyright (C) 2014 Jamal Neufeld (jamal@i11u.me) | |
* MIT Licensed | |
* @license | |
**/ | |
(function( $ ) { | |
//This is the main plugin definition |
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
var Daniela = { | |
// un array literal | |
images: ["rostro.jpg", "perfil.jpg", "corriendo.jpg", "bailando.jpg"], | |
coord: { // un objeto anidado literal | |
lat: 25.6866, | |
long: 100.3161 | |
}, | |
edad: function() { // código de | |
// la función aquí | |
} |
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
// nota como en este ejemplo todo el código que | |
// ejecuta la función llamada saludar | |
// está entre dos brackets {} | |
function saludar() { | |
var saludo = "Hola!" | |
console.log(saludo); | |
} |
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
<script> | |
// Encontrar los elementos <li> y ponerlos en una variable | |
var elements = document.getElementsByTagName('li'); | |
if (elements.length > 0) { // Si más de uno es encontrado | |
var el = elements[3]; // Selecciona el cuarto elemento de la colección | |
el.className = 'cool'; // Cambia el valor del atributo clase | |
} |
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
<script> | |
// querySelector regresa solamente la primer concordancia. | |
const MiConstante = document.querySelector('li.red'); | |
MiConstante.className = 'blue'; | |
</script> | |
<script> | |
// querySelectorAll regresa una lista de Nodos. | |
// Aunque estrictamente hablando se especifica seleccionar |
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
const UnaConstante = document.getElementById("mi_elemento"); | |
//El elemento que accesamos también puede ser dinámico usando: | |
const UnaConstante = document.getElementById(MiElemento); | |
//Donde MiElemento será una constante definida en otro lugar. | |
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
<time datetime="{{ post.date | %Y-%m-%d %H:%M+01:00 }}"> | |
{{ post.date | date: "%d. %B %Y" | replace:"January","Januar" | replace:"Februar","February" | replace:"March","März" | replace:"May","Mai" | replace:"June","Juni" | replace:"July","Juli" | replace:"December","Dezember" }} | |
</time> |