Skip to content

Instantly share code, notes, and snippets.

Building stuff. Follow on twitter for updates

Micheal Colhoun colhountech

Building stuff. Follow on twitter for updates
View GitHub Profile
colhountech /
Created Jun 8, 2022
Compress Video and Remove Silence at Start and throughout
MIT License
Copyright (c) 2022 ColhounTech Limited
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
colhountech / AcrylicUI_FieldsForBorderlessWindows.cs
Created May 20, 2022
Acrylic UI - Fields For Borderless Windows
View AcrylicUI_FieldsForBorderlessWindows.cs
#region Fields for Borderless Windows
private int borderSize = 0;
private bool _flatBorder = true;
private Size _restoreSize;
colhountech / AcrylicUI_FixFormWindowState.cs
Last active May 20, 2022
AcrylicUI Fix FormWindowState changes
View AcrylicUI_FixFormWindowState.cs
#region fix FormWindowState changes
private void SetupUIDefaults()
// Don't change this: NoBorder with Resize Hack
var designSize = this.ClientSize;
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Size = designSize;
this._restoreSize = designSize; // save for restore
colhountech / AcrylicUI_MinMaxRestore.cs
Last active May 20, 2022
AcrylicUI Min/Max/Restore for catching resize events to adjust form
View AcrylicUI_MinMaxRestore.cs
#region Min/Max/Restore for catching resize events to adjust form
private void BtnMin_Click(object sender, EventArgs e)
_restoreSize = ClientSize;
this.WindowState = FormWindowState.Minimized;
colhountech / AcrylicUI_NoBorderHack.cs
Last active May 21, 2022
AcrylicUI Window No Border Hack
View AcrylicUI_NoBorderHack.cs
#region Window, No Border Hacks
protected override void WndProc(ref Message message)
// Resize Window
if (message.Msg == WinUserH.WM_NCHITTEST)
colhountech / AcrylicUI_RoundCorners.cs
Created May 19, 2022
AcrylicUI Gist - Round Corners
View AcrylicUI_RoundCorners.cs
#region Round Corners
private void RoundCorners(bool _isWindows11)
if (_isWindows11)
DwmSetWindowAttribute(this.Handle, attribute, ref preference, sizeof(uint));
colhountech /
Created Feb 27, 2021
Turn off fluff on ubuntu images
sudo touch /etc/cloud/cloud-init.disabled
sudo systemctl disable lxd
sudo systemctl stop cloud-init
sudo systemctl disable cloud-init
sudo apt remove lvm2 -y --purge
sudo apt remove policykit-1 -y --purge
colhountech /
Last active Feb 27, 2021
strip # and blank lines from conf files
grep -v "^#" $1 | grep -v "^\s*$"
View disable ipv6 on ubuntu
# /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
# reboot
sudo reboot
# sudo vi /etc/default/grub
# add
View disable cloudinit and purge
sudo touch /etc/cloud/cloud-init.disabled
sudo apt-get purge cloud-init