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.gtk3.patch
Last active October 25, 2026 10:47
gtk3-classic+ (GTK 3.24.52) & gtk4-classic (GTK 4.24.1) & mate-notification (1.26) - for Debian Testing and Ubuntu
# GtkAboutDialog: fix license width (same as gtk4) - made by Claude Opus
# https://github.com/GNOME/gtk/blob/3.24.52/gtk/ui/gtkaboutdialog.ui
--- a/gtk/ui/gtkaboutdialog.ui
+++ b/gtk/ui/gtkaboutdialog.ui
@@ -185,7 +185,7 @@
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">1</property>
- <property name="hscrollbar-policy">never</property>
+ <property name="hscrollbar-policy">automatic</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 October 6, 2026 07:59
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.