Skip to content

Instantly share code, notes, and snippets.

View luigifab's full-sized avatar
🏝️
I'm out there

luigifab

🏝️
I'm out there
View GitHub Profile
@luigifab
luigifab / appearance__focus-visible.gtk3.patch
Last active February 11, 2024 10:11
gtk3-classic (GTK 3.24) [gtk-3.24.40-deb.sh] & gtk4-classic (GTK 4.12) [gtk-4.12.5-deb.sh] / for Debian Testing
# GtkWindow3: restore focus on application start
# https://github.com/GNOME/gtk/blob/3.24.37/gtk/gtkwindow.c
Index: b/gtk/gtkwindow.c
===================================================================
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6357,7 +6357,9 @@ gtk_window_map
/* inherit from transient parent, so that a dialog that is
* opened via keynav shows focus initially
*/
@mwwhited
mwwhited / RadexOneReverseEngineerNotes.md
Created November 20, 2020 13:07
Radex One protocol reverse engineering notes.

Radex One - USB Serial Trace

Summary

Notes from reverse engineering serial protocol used by Radex One from Quarta

Notes

○ Examples
@hdogan
hdogan / curl-smtp.php
Last active March 16, 2024 07:49
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 May 20, 2024 21:01
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.