Skip to content

Instantly share code, notes, and snippets.

@Enissay
Enissay / add_to_cart.user.js
Created February 25, 2023 00:06 — forked from beporter/add_to_cart.user.js
Greasemonkey script to repeatedly refresh a given page, look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success.
// ==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
@Enissay
Enissay / new_peer.sh
Created December 1, 2022 00:00 — forked from joneskoo/new_peer.sh
Wireguard client/server config generator
#!/bin/bash
set -eu
set -o pipefail
dns_server=172.24.100.250
client_ip=$1
psk=$(wg genpsk)
client_privkey=$(wg genkey)
client_pubkey=$(wg pubkey <<<"$client_privkey")
@Enissay
Enissay / useful-one-liners.sh
Created November 13, 2022 16:52 — forked from modem7/useful-one-liners.sh
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
@Enissay
Enissay / steam_quick_queue.user.js
Created June 24, 2017 00:52 — forked from xPaw/steam_quick_queue.user.js
Discover the Steam queue three times to get the sale cards
// ==UserScript==
// @name Steam Queue Auto Discoverer
// @namespace xpaw_steam_quick_queue
// @version 2.0.1
// @description Discover the Steam queue three times to get the sale cards
// @match http://store.steampowered.com/explore*
// @grant none
// ==/UserScript==
var DiscoveryQueueModal, GenerateQueue = function( queueNumber )
@Enissay
Enissay / css-selectors.md
Created February 15, 2016 20:04 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
function main(){
console.log("inMain!");
setTimeout(function(){ colorify() }, 1500);
$( "#browsePageFilter" ).click(function() {
main();
});
}