Skip to content

Instantly share code, notes, and snippets.

View BeSublime's full-sized avatar
🤘
Buildin' stuff.

Cory Evan Wright BeSublime

🤘
Buildin' stuff.
View GitHub Profile
@BeSublime
BeSublime / Prevent Button Shifting on SFCC Login-2024-03-27.user.js
Last active March 27, 2024 20:27
Prevent Button Shifting on SFCC Login Pages
// ==UserScript==
// @name Prevent Button Shifting on SFCC Login
// @namespace http://tampermonkey.net/
// @version 2024-03-27
// @description Fixing yet another poor UI choice.
// @author Cory Wright <coryevan@gmail.com>
// @match https://account.demandware.com/dwsso/XUI/
// @icon https://www.google.com/s2/favicons?sz=64&domain=demandware.com
// @grant none
// ==/UserScript==
@BeSublime
BeSublime / index.js
Last active March 3, 2020 18:10
Remove duplicates from an array (multiple approaches)
// Removes duplicate items from an array.
//
// Credit to this awesome article by Samantha Ming (@samantha_ming)
// https://medium.com/dailyjs/how-to-remove-array-duplicates-in-es6-5daa8789641c
const array = ['🦙', 1, 1, 2, '🦙', '🦙', 3];
// Using Set (requires ES6)
let uniqueSet = new Set(array);
let arrayFromSet = [...uniqueSet];
@BeSublime
BeSublime / compact.css
Created February 26, 2020 16:45
SFCC Business Manager compact welcome page styles for Stylus/Stylish
/* Apply to URLs matching the regexp: https:\/\/(dev\d\d|development|staging)(-|\.).+Sites-Site.*
* Plz use Stylus instead of Stylish: http://j.mp/stylish-opinion
*/
/* hide space hogs so favorites can move up */
.notification_empty,
.notification_line,
table.bm-welcome-page {
display: none;
}
@BeSublime
BeSublime / removeDuplicatesInArray.js
Last active September 4, 2019 14:59
Handy JavaScript Snippets
// Removes duplicate items from an array.
//
// Credit to this awesome article by Samantha Ming (@samantha_ming)
// https://medium.com/dailyjs/how-to-remove-array-duplicates-in-es6-5daa8789641c
const array = ['🦙', 1, 1, 2, '🦙', '🦙', 3];
// Using Set (requires ES6)
let uniqueSet = new Set(array);
let arrayFromSet = [...uniqueSet];
@BeSublime
BeSublime / GOG Game Desktop Shortcuts.md
Last active March 12, 2024 12:38
How to create shortcuts for GOG games after they've already been installed

How to Creat GOG Galaxy Game Shortcuts

If you want shortcuts for your GOG Galaxy games, make sure you have the "create shortcut on desktop" option checked in the Downloads tab in Galaxy's settings. If you didn't do that before installing a game, or accidentally deleted a shortcut, here's how to create one after the fact.

Step 1: Create a Placeholder Shortcut

Option 1: Copy an existing shortcut

This is the easiest option in my opinion, especially if you already have nother GOG game's shortcut on your desktop. Just copy and paste any existing shortcut on your desktop, either by right clicking on it and choosing copy, using CTRL-C and CTRL-V, or right-click dragging to an empty space and choosing "Copy here".

Option 2: Use the New Shortcut wizard

@BeSublime
BeSublime / autobuy.txt
Created June 14, 2016 00:43
My autobuy.txt file for Counter-Strike: Source.
// This list of "buy aliases" is used by the AutoBuy system.
// The system begins with the first alias in the list, and attempts to purchase it.
// If a primary weapon is successfully purchased, all later primary weapon aliases are skipped.
// Similarly, secondary weapon buy alias are skipped once a seconary weapon has been purchased.
// You can customize this file to reflect your weapon and equipment preferences and priorities.
//
// The console command for autobuy is "autobuy"
//
// The available buy aliases and their names as shown on the buy menu are:
// (Many weapons have more than one buy alias)
@BeSublime
BeSublime / Custom.css
Last active December 21, 2015 01:58
My preferred Chrome dev-tools theme, a modified version of SO-Dark-Monokai by Simon Owen.
/**********************************************/
/*
/* Sublime-Dark-Monokai
/* https://gist.github.com/BeSublime/6231212
/* Based on the work listed below, modified by Cory Evan Wright (@besublime)
/*
/* SO-Dark-Monokai
/* https://github.com/simonowendesign/SO-Dark-Monokai
/* Taken from the below and tweaked by Simon Owen (@simonowendesign)
/*
@BeSublime
BeSublime / static_site_generators.md
Last active December 19, 2015 05:29
An informal & incomplete of static site generator thingies.

Static Site Generator Thingies

There are many of these, and this is not a complete list. Based on a few cursory google searches, a couple skimmed articles, and github star counts, these seemed like the most popular/relevant thingies on the market at the moment:

Thingy
Brunch github website
Blacksmith github website
@BeSublime
BeSublime / test.md
Last active December 19, 2015 05:28
test gist for table markdown

test content

col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1
div.copy > span.copyerror {
position: absolute;
left: 200px;
}