Skip to content

Instantly share code, notes, and snippets.

View luigifab's full-sized avatar
🌇
hello !?

luigifab

🌇
hello !?
View GitHub Profile
@luigifab
luigifab / appearance__about_logo.gtk4.patch
Last active May 24, 2026 16:35
gtk3-classic+ (GTK 3.24.52) & gtk4-classic (GTK 4.22.4) & gtk5-classic (xptdr) - for Debian Testing and Ubuntu
# GtkAboutDialog4: define logo size (same as gtk3)
# https://github.com/GNOME/gtk/blob/4.23.0/gtk/ui/gtkaboutdialog.ui
Index: b/gtk/ui/gtkaboutdialog.ui
===================================================================
--- a/gtk/ui/gtkaboutdialog.ui
+++ b/gtk/ui/gtkaboutdialog.ui
@@ -39,6 +39,7 @@
<object class="GtkImage" id="logo_image">
<property name="icon-name">image-missing</property>
<property name="icon-size">2</property>
@hdogan
hdogan / curl-smtp.php
Last active September 9, 2024 09:58
Sending SMTP e-mail with curl/php
<?php
function read_cb($ch, $fp, $length) {
return fread($fp, $length);
}
$fp = fopen('php://memory', 'r+');
$string = "From: <no-reply@example.com>\r\n";
$string .= "To: <hdogan@example.com>\r\n";
$string .= "Date: " . date('r') . "\r\n";
$string .= "Subject: Test\r\n";
@vratiu
vratiu / .bash_aliases
Last active June 2, 2026 13:00
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@peterjaap
peterjaap / cleanImages.php
Last active February 14, 2024 14:17
Script to clean up the images tables in a Magento installation. Removes references to non-existing images, removes duplicate images, sets correct default image and deletes orphaned images from the filesystem.
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.