Skip to content

Instantly share code, notes, and snippets.

View pmdevita's full-sized avatar

Peter DeVita pmdevita

View GitHub Profile
{"schemaVersion":1,"label":"Coverage","message":"42%","color":"orange"}
@pmdevita
pmdevita / Readme.md
Last active January 28, 2024 07:20
Migrate iRedMail to Mailcow

Migrate iRedMail to Mailcow

I've been eyeing Mailcow for a while since it's use of Docker should ease the maintenance and update burden (you iRedMail users know what I'm talking about lol) and bring a better UI and user experience with it's admin panel. Here are some notes that I took from my migration in case it helps anyone else out.

I setup a Mailcow instance on another server so I could keep iRedMail operating during the migration. After it was completed, I used Mailcow's backup and restore feature to move it to my original server.

Migrating has three main parts, mail, contacts and calendars, and DKIM. There's also some configuration which I'll touch on too.

Migrating User Data

@pmdevita
pmdevita / Readme.md
Last active June 25, 2021 16:14
Linux Broadcom BCM4350/DW1820A/XPS 9350 Wi-Fi breaking on sleep fix

BCM4350/DW1820A/XPS 9350 Wi-Fi Fix

If you are using a BCM4350/DW1820A Wi-Fi card or an XPS 13 9350 on Linux, you may have run into an issue where your Wi-Fi stops working after suspension/sleep. Hopefully my hours of research can help you.

The Problem

It appears there is some kind of power management problem with this card. There are several different threads documenting these issues (I'll link them below). These issues were officially resolved sometime around kernel 4.19 but I'm still experiencing them and I imagine some other people might be too.

@pmdevita
pmdevita / SSDT-RMDT.dsl
Created May 17, 2020 03:55
Rehabman DSDT Debugging Tool CloverEFI Hotpatch
DefinitionBlock ("", "SSDT", 2, "hack", "RMDT", 0x00000000)
{
// Copy these External references to the SSDT you want to debug in
External (RMDT, DeviceObj)
External (RMDT.PUSH, MethodObj)
External (RMDT.P1, MethodObj)
External (RMDT.P2, MethodObj)
External (RMDT.P3, MethodObj)
External (RMDT.P4, MethodObj)
External (RMDT.P5, MethodObj)
@pmdevita
pmdevita / Qihoo-Blocklist
Last active January 6, 2020 19:21
Blocklist for domains accessed by Qihoo 360 on Samsung devices
360.cn
360safe.com
aicleaner.shouji.360.cn
p.s.360.cn
mvconf.f.360.cn
mvconf.uk.cloud.360safe.com
mvconf.lato.cloud.360safe.com
mvconf.cloud.360safe.com
eul.s.360.cn
@pmdevita
pmdevita / patches.json
Last active August 26, 2020 02:53
Search and replace text in Steins;Gate 0
[
["Rintaro Okabe", "Okabe Rintaro"],
["Mayuri Shiina", "Shiina Mayuri"],
["Itaru Hashida", "Hashida Itaru"],
["Kurisu Makise", "Makise Kurisu"],
["Moeka Kiryu", "Kiryu Moeka"],
["Luka Urushibara", "Urushibara Luka"],
["Suzuha Amane", "Amane Suzuha"],
["Yugo Tennouji", "Tennouji Yugo"],
["Nae Tennouji", "Tennouji Nae"],
@pmdevita
pmdevita / build.sh
Last active January 6, 2019 17:36
Debian/Ubuntu FFMPEG Build
FFMPEG_BASE="$(pwd)"
FFMPEG_SOURCES="$FFMPEG_BASE/ffmpeg_sources"
FFMPEG_BUILD="$FFMPEG_BASE/ffmpeg_build"
FFMPEG_BIN="$FFMPEG_BASE/ffmpeg_bin"
echo $FFMPEG_BASE
mkdir $FFMPEG_BIN
mkdir $FFMPEG_SOURCES
mkdir $FFMPEG_BUILD
@pmdevita
pmdevita / build.sh
Created January 6, 2019 17:34
Debian Python Build
PYTHON_BASE="$(pwd)"
version='3.7.2'
download_source() {
cd $PYTHON_BASE
wget -N https://www.python.org/ftp/python/$version/Python-$version.tar.xz
tar xf Python-$version.tar.xz
}
configure() {
@pmdevita
pmdevita / pywithssl.sh
Last active April 12, 2018 15:31
Compile portable(ish) Python with custom OpenSSL on Mac OSX
#!/bin/bash
# where to do the building
build_dir="/Users/pmdevita/Downloads"
# links to python and openssl to use
python_link="https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz"
openssl_link="https://www.openssl.org/source/openssl-1.1.0g.tar.gz"
# needs to be same file type as download
@pmdevita
pmdevita / ffmpeg-pyaudio.py
Last active February 22, 2024 07:51
Play an audio file using FFMPEG, PortAudio, and Python
# FFMPEG example of Blocking Mode Audio I/O https://people.csail.mit.edu/hubert/pyaudio/docs/
"""PyAudio Example: Play a wave file."""
import pyaudio
import wave
import sys
import subprocess
CHUNK = 1024