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
<html> | |
<head></head> | |
<body> | |
<div class="noticia">CARGANDO</div> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
<script> | |
$(function(){ | |
var url = 'https://www.domain.co/index.xml'; | |
var news = $('.noticia'); |
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
{ | |
"regiones": [ | |
{ | |
"region": "Arica y Parinacota", | |
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"] | |
}, | |
{ | |
"region": "Tarapacá", | |
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"] | |
}, |
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 Pluralyze(count, noun) { | |
var suffix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 's' | |
return count + ' ' + noun + (count !== 1 ? suffix : '') | |
} | |
// USE: | |
// Pluralyze(0, 'layer') => 0 layers | |
// Pluralyze(1, 'layer') => 1 layer | |
// Pluralyze(10, 'sandwich', 'es') => 10 sandwiches |
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
javascript:(function(){ | |
var youtube = 'https://www.youtube.com/results?search_query='; | |
var query = prompt('video query'); | |
if(query != '') { | |
document.location.href = youtube + query; | |
} | |
})(); |
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 phantom = require('phantom'); | |
var Q = require('q'); | |
var cheerio = require('cheerio'); | |
var _ph, _page, _outObj; | |
var url = ABSOLUTE_URL; // change here for your React app site | |
phantom.create().then(ph => { | |
_ph = ph; | |
return _ph.createPage(); | |
}).then(page => { |
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
.fullSlider { | |
position: relative; | |
display: block; | |
overflow: hidden; | |
} | |
.fullSlider figure { | |
position: absolute; | |
opacity: 0; | |
margin: 0; | |
-webkit-transition: 1s opacity; |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/jepunan/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="avit" |
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
/** | |
* getAllUrlParams( @url ); | |
* url: https://www.sitepoint.com/get-url-parameters-with-javascript/ | |
*/ | |
function getAllUrlParams(url) { | |
var queryString = url ? url.split('?')[1] : window.location.search.slice(1); | |
var obj = {}; | |
if (queryString) { |