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
/* | |
* Sets the zoom to make the "wrapper" element fit the width of the page. | |
* | |
* $element is either a jQuery object -the wrapper- or directly the width of the wrapper in pixels. | |
* margin_perc (optional) is the percentage that will be left at both sides | |
* max_ratio (optional) is an upper limit to the zoom ratio | |
* | |
* This function does nothing if the original or the resulting width of the wrapper is greater than the <html> element. | |
* Dependencies: jQuery (any version will do) | |
* |
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 e = document.querySelector('.site-header'); | |
e.parentElement.removeChild(e); | |
e = document.querySelector('.site-footer'); | |
e.parentElement.removeChild(e); | |
e = document.querySelector('.blog-post__comments'); | |
e.parentElement.removeChild(e); | |
e = document.querySelector('.social-media-links'); | |
e.parentElement.removeChild(e); | |
e = document.querySelector('.blog-post'); | |
e.style.maxWidth = 'inherit'; |
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
<?php | |
// composer require guzzlehttp/guzzle jotaelesalinas/php-rwgen | |
require 'vendor/autoload.php'; | |
define('DATA_DIR', dirname(__FILE__) . '/data'); | |
$states = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY']; | |
$year_init = 1960; | |
$year_end = 2016; |
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 selectors = [ | |
'.metabar' | |
, 'main > article > header' | |
, '.js-stickyFooter' | |
, '.supplementalPostContent' | |
, '.js-postFooterPlacements' | |
, 'footer > .container > section' | |
, '.postActions' | |
, '.postPromotionWrapper' | |
, '.js-postFooterPlacements' |
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 selectors = [ '.SidebarMenu' , '.ActionBar' , '.TitleBar' , '.SidebarSocial' , '.social__top' , '.social__bottom']; | |
var e = false;for ( var i = 0, l = selectors.length; i < l; i++ ) { while (e = document.querySelector(selectors[i])) { e.parentElement.removeChild(e); }} | |
e = document.querySelectorAll('.Main');for ( var i = 0, l = e.length; i < l; i++ ) { e[i].style.margin = '2em';} | |
e = document.querySelectorAll('.Tutorial');for ( var i = 0, l = e.length; i < l; i++ ) { e[i].style.margin = '0'; e[i].style.padding = '0'; e[i].style.border = '0'; e[i].style.maxWidth = 'inherit';} | |
e = document.querySelector('body');e.style.backgroundImage = 'none';e = document.querySelector('body');e.style.backgroundColor = '#fff'; |
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/bash | |
# set locale to utf8 | |
sudo apt-get install -y language-pack-en-base | |
# add php7 repo | |
sudo LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php | |
# adding key for nodejs repo | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280 | |
# add nodejs 7 repo |
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 read_from_console ($prompt) { | |
if ( function_exists('readline') ) { | |
$line = trim(readline($prompt)); | |
if (!empty($line)) { | |
readline_add_history($line); | |
} | |
} else { | |
echo $prompt; | |
$line = trim(fgets(STDIN)); | |
} |
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
.highlight { | |
background-image: linear-gradient(-100deg,hsla(90,92%,75%,.3),hsla(90,92%,75%,.7) 98%,hsla(90,92%,75%,.1)); | |
border-radius: .25em 0; | |
padding: 0 .25em; | |
margin: 0 -.25em; | |
} | |
.underline { | |
background-image: linear-gradient(120deg, darkorange 0%, orange 100%); | |
background-repeat: no-repeat; | |
background-size: 100% 0.2em; |
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 self = this; | |
self.version = '1.2'; | |
self.els = {}; | |
self.utils = {}; | |
self.utils.addEvent = function (el, evname, f, capture) { |
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 remove = [ | |
'.global-nav', | |
'.avert', | |
'.content-heading', | |
'.content-banner__content-breadcrumb', | |
'.content-author', | |
'.post__footer', | |
'.avert--sticky', | |
'.layout__sidebar', | |
'.market-highlight', |
OlderNewer