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
// from: // https://stackoverflow.com/a/17604251/2148418 | |
var parseXml; | |
if (typeof window.DOMParser != "undefined") { | |
parseXml = function(xmlStr) { | |
return ( new window.DOMParser() ).parseFromString(xmlStr, "text/xml"); | |
}; | |
} else if (typeof window.ActiveXObject != "undefined" && new window.ActiveXObject("Microsoft.XMLDOM")) { |
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
<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 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
{ | |
"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 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 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 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
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 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 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 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
.fullSlider { | |
position: relative; | |
display: block; | |
overflow: hidden; | |
} | |
.fullSlider figure { | |
position: absolute; | |
opacity: 0; | |
margin: 0; | |
-webkit-transition: 1s opacity; |
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
# 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" |