Skip to content

Instantly share code, notes, and snippets.

View shoelaced's full-sized avatar

Gregory Storkan shoelaced

  • Artbrander
  • London, UK
  • 12:55 (UTC +01:00)
View GitHub Profile
@stereokai
stereokai / gist:36dc0095b9d24ce93b045e2ddc60d7a0
Last active September 25, 2025 20:54
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: padding-box, border-box;
}
@bekarice
bekarice / wc-disable-any-repeat-purchase.php
Last active September 12, 2024 16:37
Disables Repeat Purchase for any WooCommerce product
<?php
/**
* Disables repeat purchase for products / variations
*
* @param bool $purchasable true if product can be purchased
* @param \WC_Product $product the WooCommerce product
* @return bool $purchasable the updated is_purchasable check
*/
function sv_disable_repeat_purchase( $purchasable, $product ) {
@brandonheyer
brandonheyer / rgbToHSL.php
Last active March 9, 2025 17:19
PHP snippet to convert RGB to HSL and HSL to RGB.
<?
function rgbToHsl( $r, $g, $b ) {
$oldR = $r;
$oldG = $g;
$oldB = $b;
$r /= 255;
$g /= 255;
$b /= 255;