Skip to content

Instantly share code, notes, and snippets.

View jasonandmonte's full-sized avatar

Jason jasonandmonte

View GitHub Profile
@jasonandmonte
jasonandmonte / check-boxes.js
Created January 14, 2019 16:00
Checks all the boxes on the web page for the Magento export.
var inputs = document.getElementsByTagName("input");
for(var i = 0; i < inputs.length; i++) {
if(inputs[i].type == "checkbox") {
inputs[i].checked = true;
}
}
'Testing if can commit'
'Test 2'
'Test 3'
// ref: how I saved the edit: https://stackoverflow.com/questions/5299526/github-committing-push-gist
// ref: commit history https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
// ref: https://gist.github.com/eduncan911/7c7ddb02b16ed83478e22aa4d209b17f
@jasonandmonte
jasonandmonte / miva-iter-template.xml
Last active August 7, 2020 19:38
Miva feed iterator template with product attributes and categories.
<mvt:comment>
| Lookup Categories each product is assigned to and output them as a single
| pipe (|) seperated list
</mvt:comment>
<mvt:assign name="g.assigned_categories" value="''" />
<mvt:assign name="g.category_list" value="''" />
<mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Offset_Product_Assigned(l.settings:record:id,0,'','',0,l.null, g.assigned_categories )" />
@jasonandmonte
jasonandmonte / miva-print-structure.xml
Created August 6, 2020 19:56
Print all entities (keys) associated with the provided target.
<mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:record), ',', '<br>'))" />
{
"const": {
"prefix": "c",
"body": "const $0",
"description": "const"
},
"let": {
"prefix": "l",
"body": "let $0",
"description": "let"
@jasonandmonte
jasonandmonte / stack-overflow-sort-votes.user.js
Created June 16, 2021 20:53
Sorts Stack Overflow answers by votes including the accepted answer.
// ==UserScript==
// @name Stack Overflow - Sort By Votes
// @version 1.0.0
// @description Ignores accepted answer and sorts answers by most votes
// @author https://github.com/jasonandmonte
// @match https://stackoverflow.com/questions/*
// @grant none
// ==/UserScript==
(() => {