Skip to content

Instantly share code, notes, and snippets.

View mariusbolik's full-sized avatar
🏠
Working from home

Marius mariusbolik

🏠
Working from home
View GitHub Profile
@mariusbolik
mariusbolik / extract-color.ts
Created October 6, 2025 15:31
Extract Main Color from Image (TypeScript)
import { Jimp, intToRGBA } from "jimp";
type RGB = { r: number; g: number; b: number };
type DominantColor = RGB & { hex: string };
interface Options {
/** Downscale before sampling (faster, negligible accuracy loss). */
sampleSize?: number;
/** Ignore pixels with alpha below this (0–255). */
alphaThreshold?: number;
@mariusbolik
mariusbolik / rumpf-standard.html
Last active September 2, 2025 15:34
mySF x Rumpf
<!-- IMPORTANT: Place the following code before the closing body tag (</body>) -->
<!-- Load the mySHOEFITTER Script -->
<script src="https://js.myshoefitter.com/v1/script.js"></script>
<!-- Initialize mySHOEFITTER -->
<script type="application/javascript">
const isEng = document.querySelector('html').getAttribute('lang').includes('en');
myshoefitter.init({
shopSystem: 'shopware',
@mariusbolik
mariusbolik / rumpf-tampermonkey.js
Last active July 3, 2025 08:43
Rumpf x mySF (TamperMonkey)
// ==UserScript==
// @name mySF (Rumpf)
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Injects MyShoeFitter script into websites
// @author You
// @match https://*/*
// @match http://*/*
// @grant none
// @run-at document-end
@mariusbolik
mariusbolik / rumpf.html
Last active July 2, 2025 16:18
mySF + Rumpf
<!-- Load the mySHOEFITTER Script -->
<script src="https://js.myshoefitter.com/v1/script.js"></script>
<!-- Initialize mySHOEFITTER -->
<script type="application/javascript">
const isMobile = window.innerWidth <= 800;
const referenceBtn = isMobile ? '.btn-fibbl.mobile' : '.btn-fibbl.js-hide-on-mobile';
const isEng = document.querySelector('html').getAttribute('lang').includes('en');
myshoefitter.init({
shopSystem: 'shopware',
@mariusbolik
mariusbolik / devin.txt
Created April 23, 2025 16:03
Devin System Prompt
## General Instructions
You are Devin, a software engineer using a real computer operating system. You are a real code-wiz: few programmers are as talented as you at understanding codebases, writing functional and clean code, and iterating on your changes until they are correct. You will receive a task from the user and your mission is to accomplish the task using the tools at your disposal and while abiding by the guidelines outlined here.
## When to Communicate with User
- When encountering environment issues
- To share deliverables with the user
- When critical information cannot be accessed through available resources
- When requesting permissions or keys from the user
- Use the same language as the user
@mariusbolik
mariusbolik / empressofheels.html
Last active February 18, 2025 13:10
mySHOEFITTER x Empress of Heels
<!-- Load the mySHOEFITTER Script -->
<script src="https://js.myshoefitter.com/v1/script.js"></script>
<!-- Initialize mySHOEFITTER -->
<script type="application/javascript">
myshoefitter.events(event => {
console.log('mySHOEFITTER Event', event);
if (event.type === 'RESULT') {
// Work with the result - e.g. preselect size in shop
if (typeof hj === 'function' && 'result' in event.data) {
@mariusbolik
mariusbolik / script.html
Last active June 12, 2024 08:55
Triple20 mySHOEFITTER
<!-- Load the mySHOEFITTER Script -->
<script src="https://js.myshoefitter.com/v1/script.js"></script>
<!-- Initialize mySHOEFITTER -->
<script type="application/javascript">
myshoefitter.init({
shopSystem: 'shopify',
button: {
text: 'Jetzt passende Größe finden',
styles: {
@mariusbolik
mariusbolik / orbisana.html
Created February 14, 2024 09:21
mySHOEFITTER x Orbisana Demo Code
<!-- Load the mySHOEFITTER Script -->
<script src="https://js.myshoefitter.com/v1/script.js"></script>
<!-- Initialize mySHOEFITTER -->
<script type="application/javascript">
myshoefitter.init({
shopId: '65cc7e70ba912c607ca8', // Orbisana
productId: '140847915' // Hawaii
});
</script>
@mariusbolik
mariusbolik / isVisible.ts
Created November 11, 2022 10:18
Check if HTML Element is visible in Viewport
isVisible(elem: HTMLElement) {
if (!(elem instanceof Element)) { throw Error('DomUtil: elem is not an element.'); }
const style = getComputedStyle(elem);
if (style.display === 'none') { return false; }
if (style.visibility !== 'visible') { return false; }
if (Number(style.opacity) < 0.1) { return false; }
if (elem.offsetWidth + elem.offsetHeight + elem.getBoundingClientRect().height +
elem.getBoundingClientRect().width === 0) {
return false;
}
@mariusbolik
mariusbolik / package.json
Last active January 15, 2022 14:00
Ghost Blog Zoho Email Configuration (Nodemailer)
{
...
"mail": {
"from": "\"Sender Name\" <[email protected]>", <- REPLACE
"transport": "SMTP",
"options": {
"service": "Zoho",
"host": "smtp.zoho.eu",
"port": 587,
"secure": false,