Skip to content

Instantly share code, notes, and snippets.

View sharnie's full-sized avatar

Sharnie Ivery sharnie

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,600);
body {
background-color: #2ecc71;
if (!document.querySelectorAll) {
document.querySelectorAll = function (selectors) {
var style = document.createElement('style'), elements = [], element;
document.documentElement.firstChild.appendChild(style);
document._qsa = [];
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
window.scrollBy(0, 0);
style.parentNode.removeChild(style);
require 'nokogiri'
require 'open-uri'
usernames = [
'brianknight10',
'annekagoss',
'bethannezink',
'DanFerrer',
'antropova',
'himedlooff',
@sharnie
sharnie / javascript_build_system_for_sublime.json
Created September 4, 2015 19:53
JavaScript build for Sublime
{
"cmd": ["/usr/local/bin/node", "$file", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "*.js"
}
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
(function() {
'use strict';
if ( !$('#narrow-form').length ) {
return false;
}
var markup = `
<img src="http://i00.i.aliimg.com/wimg/buyer/single/icon-ems.jpg" style="border: 3px solid #6FFF96; position: absolute; z-index: 0; width: 55px;" />
(function() {
'use strict';
if ( location.pathname !== "/p/PRODUCT-ID HERE/savers" ) {
return false;
}
function rand_between( num1, num2 ) {
return Math.floor(Math.random() * num2) + num1;
.shadow {
text-shadow: #2f64af 1px 1px,#2f64af 2px 2px,#2f64af 3px 3px,#2f64af 4px 4px,#2f64af 5px 5px,#2f64af 6px 6px,#2f64af 7px 7px,#2f64af 8px 8px,#2f64af 9px 9px,#2f64af 10px 10px,#2f64af 11px 11px,#2f64af 12px 12px,#2f64af 13px 13px,#2f64af 14px 14px,#2f64af 15px 15px,#2f64af 16px 16px,#2f64af 17px 17px,#2f64af 18px 18px,#2f64af 19px 19px,#2f64af 20px 20px,#2f64af 21px 21px,#2f64af 22px 22px,#2f64af 23px 23px,#2f64af 24px 24px,#2f64af 25px 25px,#2f64af 26px 26px,#2f64af 27px 27px,#2f64af 28px 28px,#2f64af 29px 29px,#2f64af 30px 30px,#2f64af 31px 31px,#2f64af 32px 32px,#2f64af 33px 33px,#2f64af 34px 34px,#2f64af 35px 35px,#2f64af 36px 36px,#2f64af 37px 37px,#2f64af 38px 38px,#2f64af 39px 39px,#2f64af 40px 40px,#2f64af 41px 41px,#2f64af 42px 42px,#2f64af 43px 43px,#2f64af 44px 44px,#2f64af 45px 45px,#2f64af 46px 46px,#2f64af 47px 47px,#2f64af 48px 48px,#2f64af 49px 49px,#2f64af 50px 50px,#2f64af 51px 51px,#2f64af 52px 52px,#2f64af 53px 53px,#2f64af 54px 54px,#2f64af 55px 55px,#2f64af 56px 56px,#2f64af 5
/**
* Only display Facebook Ads
* in your news feed
*/
const renderFacebookAds = () => {
'use strict';
const userPosts = document.querySelectorAll('[id*="hyperfeed_story_id"]');
Array.from(userPosts).map(userPost => {
(function() {
'use strict';
const container = document.querySelector('.products-thumbnails.product-card-container, .products-grid');
const products = container.querySelectorAll('.product-card, .js-paginated-product.user-product-card');
const sortBySaves = Array.from(products).sort((productA, productB) => {
const savesA = productA.querySelector('.save-it.overlay-button .js-saves-count').innerText.replace(/[^\d+]+/gi, '');
const savesB = productB.querySelector('.save-it.overlay-button .js-saves-count').innerText.replace(/[^\d+]+/gi, '');
return savesA - savesB;