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 lang="en" ng-app="cosasPorHacer"> | |
<body ng-controller="cosasPorHacer_Ctrl"> | |
<!-- ng-submit se dispara cuando el formulario se envía (bien sea por el accionar de la tecla Enter o por clic sobre el botón "Enviar"); ejecutará "agregarElemento" es el nombre de la función que inserta elementos en el array "$scope.listaDeCosas". --> | |
<form ng-submit="agregarElemento()"> | |
<!-- La propiedad ' ng-model="cosaPorHacer" ' del input hace que Angular pueda tomar su valor desde el controlador. Angular se debe referir a este modelo usando "$scope.cosaPorHacer" --> | |
<input type="text" ng-model="cosaPorHacer" placeholder="Agregar nueva cosa por hacer"> | |
<input type="submit"> | |
</form> | |
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 filtroBooleanos () { | |
return function (input) { | |
if(input === false || input == 0){ | |
return "falso"; | |
}else if(input === true || input == 1){ | |
return "verdadero" | |
} | |
} | |
} | |
angular |
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 decaser = function(input){ | |
var newStr = [], | |
resultStr; | |
for( var i = 0 ; i < input.length ; i++ ){ | |
if(input.substring(i,i+1) === input.substring(i,i+1).toUpperCase()){ | |
var spacedDecased = " "+input.substring(i,i+1).toLowerCase(); | |
newStr.push(spacedDecased); | |
}else{ | |
newStr.push(input.substring(i,i+1)) | |
} |
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
<!-- | |
* Sublime Text 2 | |
* Inside Sublime go to | |
* Preferences -> Browse Packages | |
* Open the JavaScrip folder | |
* Save this snippet there with the .sublime-snippet file extension | |
* Sublime Text 3 | |
* Tools > New Snippet > *Replace the content with this* > *Save right there where Sublime suggests* | |
--> |
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 () { | |
var a = (Date.now()*(Date.now())*1e+1*(3e+8*(Date.now()))).toString(36); | |
return a.substr(5,a.length); | |
} |
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></title> | |
</head> | |
<body ng-app="listaDeCosasPorHacer"> | |
La respuesta a la vida, el universo y todo es: {{7*6}} | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.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
alias gss='git status' | |
alias gc='git add --all && git commit -am' | |
alias gl='git log' | |
alias gco='git checkout ' | |
alias gresetrepo='git fetch origin && git reset --hard origin/master && git clean -f -d' | |
alias cls='printf "\033c"' | |
# An alias to set an environment variable depending on the user input | |
alias aliasvar="read -p 'Alias variable name: ' var; read -p 'Alias variable value: ' val; export \"\$var\"=\"\$val\"" |
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/sh | |
THEM_APPS="google-chrome-stable \ | |
git-core \ | |
tig \ | |
curl" | |
THEM_MODULES="yo \ | |
gulp \ | |
bower \ | |
live-server \ |
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
{ | |
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected. | |
// Example: | |
"Console log": { | |
"prefix": "c", | |
"body": [ | |
"console.log($1);" |
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
"use strict"; | |
class Tostada { | |
constructor(config) { | |
// Exponemos config como una variable 'global' dentro de la clase | |
this.config = config; | |
let estilos = document.createElement('style'); | |
estilos.innerHTML = ` |
OlderNewer