Skip to content

Instantly share code, notes, and snippets.

View Blumed's full-sized avatar

Cullan Blumed

View GitHub Profile
@Blumed
Blumed / bookmarklet-cabin-website-carbon-checker.js
Last active September 7, 2025 04:06
Cabin Analytics - How green is your site? Check the current page you are on using Cabin's green site checker
const bookmarklet = { name: "bookmarklet__cabin-how-green-is-your-site?", version: "1.0" };
try {
window.open(`https://withcabin.com/how-green-is-your-website?url=${window.location.href}`, '_blank', 'noopener,noreferrer');
console.log(`${bookmarklet.name}: ${bookmarklet.version}`);
} catch (error){
console.log(`${bookmarklet.name} : ${bookmarklet.version} : ${error}`);
}
// Paste the one line below into your bookmark url field for this code to work
javascript:(function(){const bookmarklet={name:"bookmarklet__cabin-how-green-is-your-site?",version:"1.0"};try{window.open(`https://withcabin.com/how-green-is-your-website?url=${window.location.href}`,"_blank","noopener,noreferrer"),console.log(`${bookmarklet.name}: ${bookmarklet.version}`)}catch(o){console.log(`${bookmarklet.name} : ${bookmarklet.version} : ${o}`)}}());
@Blumed
Blumed / Documentation.md
Last active August 3, 2025 03:22
This bookmarklet serves as a template for merge request messages and super detailed slack message for posting your merge request in a slack channel

Gitlab MR template and Gitlab MR to Slack message linter

Screenshot 2025-08-02 at 8 39 18 PM

This bookmarklet has three functionalities.

  1. Creates MR template for you.
  2. Grabs data from your MR page and lints it.
  3. When it grabs all the data from your MR page it saves in your clickboard as a pretty message for slack in markdown format.

How To Use It

@Blumed
Blumed / createElement.js
Last active June 27, 2025 05:10
Bookmarklet Utilities Functions: unique name, create svg element, create element
const customElement = (tag, props = {}) => {
const element = document.createElement(tag);
if (props.id) element.id = props.id;
if (props.className) element.classList.add(props.className);
if (props.style) Object.assign(element.style, props.style);
if (props.text) element.textContent = props.text;
@Blumed
Blumed / Documentation.md
Last active August 3, 2025 03:13
A more helpful console.log snippet for vscode

Better JS console.log's VScode Snippets

Screenshot 2025-03-30 at 6 09 52 PM

Why did I make this?

I work in large codebase with lots of errors and warnings in the console that do not actually matter. I also don't like filtering my console messages to info only because I will forget to switch it back to verbose. Might be a me issue ?? I wanted to make my console message standout more visually in devtools and provide a quick way to jump back into my code from the browser.

@Blumed
Blumed / Documentation.md
Last active September 7, 2025 04:16
pixel to rem converter bookmarklet

Pixel to Rem Converter

Screenshot 2025-08-02 at 9 38 36 PM

Features:

  • It reads the current pages root pixel size and unit size calculations will be based off of it
  • You can edit the root pixel size if you would like and all calculations of unit sizes will change accordingly
  • Updating the pixel value will update the rem value automatically
  • Updating the rem value will update the pixel value automatically
  • Using the copy buttons will append the unit name to the end of the value for you ex. 10px or 0.625rem
@Blumed
Blumed / bookmarklet-color-picker.js
Last active September 7, 2025 04:16
Color picker bookmarklet
const bookmarklet = { name: "bookmarklet__color-picker", version: "1.0" };
(async () => {
try {
const selectedColor = await new EyeDropper().open();
navigator.clipboard.writeText(selectedColor.sRGBHex);
console.log(`${bookmarklet.name}: ${bookmarklet.version}`);
} catch (error) {
console.log(`${bookmarklet.name} : ${bookmarklet.version} : ${error}`);
}
})();
@Blumed
Blumed / basic-example.js
Last active May 9, 2024 05:03
bookmarklet: modal with buttons for copying text. I added another file to show how you can iterate and build off your idea's
const container = document.createElement('dialog');
function createDialog() {
const close = document.createElement('button');
container.setAttribute('style', 'width: 100%;letter-spacing:1px;background-color:pink;font-family:helvetica !important;font-weight:100;border-radius:12px;padding-inline:60px;color:#161613;border-color:#fff;position:fixed;inset:0;margin:auto;width:100%;max-width:400px;z-index:2147483647;font-size:18px;text-rendering:optimizeLegibility;text-align:left;line-height:36px;');
close.setAttribute('style', 'position:absolute;right:10px;top:8px !important;background-color:white;border-radius:50%;color:black;z-index:30;padding:0 0 0 1px;font-size:15px;font-weight:100;width:20px;height:20px;cursor:pointer;display:flex;justify-content:center;align-items:flex-start;border:1px solid black;line-height:16px;');
close.textContent = 'x';
close.onclick = () => container.remove();
@Blumed
Blumed / datetime-decimal-format.js
Last active April 12, 2024 23:27
Bookmarklet for right now time in this 2024.04.12.15.25 format
/*
Raw Code
*/
try {
const rightNow = new Intl.DateTimeFormat("en-US", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
@Blumed
Blumed / .zshrc
Last active April 6, 2024 19:04
Simple bash function for opening any repo in your git project directory using any editor.
openWork() {
StartColor="\e[1;32m"
EndColor="\e[0m"
editor="code" # add command which opens files/dirs using your editor
workDirectory=(~/dev/) # add your path to your work directory
directories=($workDirectory*)
PS3="Enter the number associated with a directory you want to open with $editor? "
echo "There are ${StartColor}${#directories[@]}${EndColor} directories in ${StartColor}${workDirectory}${EndColor}:"; \
select directory in "${directories[@]##*/}"; do echo "Opening ${StartColor}${directory}${EndColor}"' with '${StartColor}${editor}${EndColor}'!'; $editor $workDirectory${directory}; break; done
}
@Blumed
Blumed / bs-breaks.sh
Created April 24, 2018 19:24
Quickly print bootstrap 3 common grid numbers to terminal by running this script
#!/bin/bash
echo "
$(tput bold)$(tput smul)Bootstrap $(tput setaf 6)V3.3.7$(tput sgr0)
$(tput setaf 7)$(tput bold)Grid$(tput sgr0)
$(tput setaf 7)\$$(tput setaf 5)screen-xs-min $(tput setaf 7)= $(tput setaf 6)0
$(tput setaf 7)\$$(tput setaf 5)screen-xs-max $(tput setaf 7)= $(tput setaf 6)767px
$(tput setaf 7)\$$(tput setaf 5)screen-sm-min $(tput setaf 7)= $(tput setaf 6)768px