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
// ==UserScript== | |
// @name Add Saved Items to Cart | |
// @namespace https://gist.github.com/beporter/ce76204bcba35d9edb66b395bb5e9305 | |
// @version 0.5 | |
// @description Repeatedly refresh a given "saved items" page (Amazon, Walmart, BestBuy), look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success. | |
// @author https://github.com/beporter | |
// @match https://www.amazon.com/gp/registry/wishlist/* | |
// @match https://www.amazon.com/hz/wishlist/ls/* | |
// @match https://www.bestbuy.com/cart | |
// @match https://www.bestbuy.com/site/customer/lists/manage/saveditems |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>HTML Table to Markdown Extra Table</title> | |
<style type="text/css"> | |
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;} | |
body { font-family: -apple-system, "Segoe UI", Arial, Helvetica, sans-serif; line-height: 1.5; | |
text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } | |
textarea { width: 100%; height: 15em; } |
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
// does not work... | |
var tar = require('tar'); | |
var fstream = require('fstream'); | |
var input = `node_modules`; | |
var reader = fstream.Reader({type: "Directory", path: input}); | |
var pack = tar.Pack(); | |
reader.pipe(pack).pipe(tar.Extract({path: '/tmp/destination-node-tar'})); |
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 scrollTo(Y, duration, easingFunction, callback) { | |
var start = Date.now(), | |
elem = document.documentElement.scrollTop?document.documentElement:document.body, | |
from = elem.scrollTop; | |
if(from === Y) { | |
callback(); | |
return; /* Prevent scrolling to the Y point if already there */ | |
} |
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
Show hidden characters
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// | |
// * set all enforcing options to 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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir $HOME/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=$HOME/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
#curl https://npmjs.org/install.sh | sh # this is no longer required |