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
#!/usr/bin/env bash | |
site="https://www.site.com/" | |
wget -e robots=off --wait 0.25 --mirror --convert-links --adjust-extension --page-requisites --no-parent ${site} |
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
//-- blech | |
var is_blech = false; | |
var blech_init = function () { | |
var css_str = "@keyframes strobe { 50% {background: purple;color: #00ee00;} } .strobe {animation-play-state: running;animation-duration: 100ms;} .strobe > a {animation-play-state: running;animation: strobe 100ms steps(1, end) infinite;}"; | |
var css_node = document.createElement('style'); | |
css_node.appendChild(document.createTextNode(css_str)); | |
document.head.appendChild(css_node); | |
is_blech = true; | |
} |
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
jQuery('a').map(function (i, el) { | |
var elem = $(el); | |
var href = elem.attr('href'); | |
var host = window.location.host; | |
if (href.indexOf(host) < 0 && href.indexOf('http') > -1) { | |
elem.attr('target', '_blank'); | |
} | |
}) |
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
/*-------------------------- | |
Usage: Plunk this in the browser's js console. | |
- run checkUnchecked() to check all the unchecked things. | |
- run reportUnchecked() to see if anything isn't checked (useful to circle-back after going through 15 pages: wrap it in setInterval and flip back through | |
*/ | |
window.collectCheckboxes = function () { | |
return Array.from( | |
jQuery('[name*="variable_enabled"]') | |
); | |
} |
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
const imagemin = require('imagemin'); | |
const ImageminGm = require('imagemin-gm'); | |
const Imagemin_jpgMoz = require('imagemin-mozjpeg'); | |
const imagemin_gm = new ImageminGm(); | |
const imPlugins = [ | |
imagemin_gm.resize({ | |
width: 700, | |
gravity: 'Center' |
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
/** | |
* I just paste this in my browser console when I'm curious. Nothing fancy ;) | |
* it doesn't account for paging, which.... if it was that serious, I'd use the Toggl Api. | |
*/ | |
window.timeMetrics = (function(){ | |
//-- get seconds worked from total (at the top of detailed report, at least) | |
var parts = document.querySelector('.total-sum .duration') | |
.outerText | |
.split(':'); | |
//-- [hours, minutes, seconds] |
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
/** | |
Still an IIFE, so it's still a drop-in; but this version accounts for a lot more edge cases and portability issues. | |
*/ | |
(function (breakpoint, horizontalOffset, period) { | |
// var breakpoint = 500; | |
// var horizontalOffset = "-5rem"; | |
var isOffset = false; | |
var hasNatural = false; | |
var horizontalNatural = {left: 0, right: 0}; | |
var frames, jotscriptwrapper; |
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
/node_modules/ | |
/css/ |
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
h1, h2, h3, h4, h5, h6 { | |
color: red !important; | |
} |
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
#!/usr/bin/env bash | |
# MIT License: *especially* the warranty\liability limitations. | |
# Please be responsible when using bash to recursively alter git repos. | |
# | |
# usage ./updaterepos-find.sh | |
# where to start find. | |
base="/home/me/workspaces" | |
# github username mapping |
NewerOlder