Skip to content

Instantly share code, notes, and snippets.

View deroses's full-sized avatar

Adam Rose deroses

View GitHub Profile
@MichaelLawton
MichaelLawton / deleteAmazonSavedItems.js
Last active April 24, 2024 19:06
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedItems,100);
}
else {
console.log('Finished');
@bmcbride
bmcbride / fulcrum_mysql_webhook.php
Last active August 4, 2018 12:24
Fulcrum Webhook script for syncing data shares to a MySQL database. Requires PHP with PDO & allow_url_fopen enabled.
<?php
/**
* Title: Fulcrum Webhook for syncing data shares to MySQL database
* Notes: Requires PHP with PDO & allow_url_fopen enabled
* Author: Bryan R. McBride
* Source: https://gist.github.com/bmcbride/44afdc10ee943b4e7b92
*/
# Fulcrum app information
$formID = 'your-fulcrum-form-id';
@lmullen
lmullen / gist:3767386
Created September 22, 2012 18:50
Make all markdown files in directory into PDFs
# Produce PDFs from all Markdown files in a directory
# Lincoln Mullen | http://lincolnmullen.com | lincoln@lincolnmullen.com
# List files to be made by finding all *.md files and appending .pdf
PDFS := $(patsubst %.md,%.md.pdf,$(wildcard *.md))
# The all rule makes all the PDF files listed
all : $(PDFS)
# This generic rule accepts PDF targets with corresponding Markdown
@laacz
laacz / nearest-road.sql
Created May 19, 2012 08:19
PostGIS: Find nearest roads (represented by linestring) to a given point
/*
* Road data comes from OpenStreetmap (http://download.geofabrik.de/osm/)
**/
select st_distance(st_closestpoint(r.the_geog::geometry, wa.location::geometry), wa.location::geometry) as cp
, r.name
, r.ref
, r.ogc_fid
, r.type
, st_astext(wa.location)
, wa.*