Skip to content

Instantly share code, notes, and snippets.

View mauro-miatello's full-sized avatar

MrM mauro-miatello

  • Padova (Italy)
View GitHub Profile
@hakerdefo
hakerdefo / sources.list
Created June 11, 2023 18:47
Debian 12 "bookworm" complete sources.list
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
@WimObiwan
WimObiwan / sp_BackupDatabases.sql
Created January 21, 2019 15:43
sp_BackupDatabases on SQL Express
USE [master]
GO
/****** Object: StoredProcedure [dbo].[sp_BackupDatabases] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('sp_BackupDatabases') IS NOT NULL
BEGIN
@markuscraig
markuscraig / sync_gdrive.py
Last active October 16, 2024 12:13
Rclone + Google Drive sync script
#!/usr/bin/env python
import os
import shutil
import subprocess
# global variables
SYNC_DIRS = [
{
'src': "/Volumes/PhotoArchive/Lightroom",
@cryzed
cryzed / fix-infinality.md
Last active August 31, 2024 13:05
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@wilkart
wilkart / sendEmail.patch
Last active July 29, 2024 09:32
sendEmail.pl 1.56 patched to use TLS 1.2
67,68c67,68
< "tls_client" => 0, ## If TLS is supported by the client (us)
< "tls_server" => 0, ## If TLS is supported by the remote SMTP server
---
> "tls_client" => 1, ## If TLS is supported by the client (us)
> "tls_server" => 1, ## If TLS is supported by the remote SMTP server
1906c1906
< if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3')) {
---
> if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'TLSv1_2', SSL_verify_mode => 0 )) {
@floudet
floudet / ssh-chroot-jail.sh
Created June 19, 2016 11:57
Chroot Jail for SSH Access
# Chroot Jail for SSH Access
# Tested on Ubuntu 14.04.2 LTS and Debian GNU/Linux 8 (jessie)
# Reference : http://allanfeid.com/content/creating-chroot-jail-ssh-access
#
# Had to add/change several things to make it work, including:
# - create lib64 folder
# - copy whoami dependencies that ldd doesn't show to fix 'I have no name!'
# in the customized prompt + create passwd file
#
@jaywilliams
jaywilliams / csv_to_array.php
Created April 30, 2010 23:18
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array