Skip to content

Instantly share code, notes, and snippets.

View dobromir-hristov's full-sized avatar
💭
Flexing code and coding muscles

Dobromir Hristov dobromir-hristov

💭
Flexing code and coding muscles
View GitHub Profile
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@jegtnes
jegtnes / sass_colorfunctions.php
Created June 6, 2013 08:43
A function attempting to rudimentary replicate SASS lighten/darken functions. Adapted from Frxstrem's answer on StackOverflow: http://stackoverflow.com/questions/3512311/how-to-generate-lighter-darker-color-with-php
<?php
function sass_darken($hex, $percent) {
preg_match('/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i', $hex, $primary_colors);
str_replace('%', '', $percent);
$color = "#";
for($i = 1; $i <= 3; $i++) {
$primary_colors[$i] = hexdec($primary_colors[$i]);
$primary_colors[$i] = round($primary_colors[$i] * (100-($percent*2))/100);
$color .= str_pad(dechex($primary_colors[$i]), 2, '0', STR_PAD_LEFT);
}