Skip to content

Instantly share code, notes, and snippets.

View colhountech's full-sized avatar
💭
Building stuff. Follow on twitter for updates

Micheal Colhoun colhountech

💭
Building stuff. Follow on twitter for updates
View GitHub Profile
@colhountech
colhountech / github-api-quickstart.url
Last active December 12, 2015 16:26
simple request to github endpoint using curl
curl https://api.github.com/users/colhountech -H "Accept: application/vnd.github.v3+json" -k
@colhountech
colhountech / get-meta-gists.curl
Created December 12, 2015 16:29
get meta-info for all my gists
curl https://api.github.com/users/colhountech/gists -H "Accept: application/vnd.github.v3+json" -k
https://gist.github.com/spikegrobstein/4384954
1. Create a file: /etc/wsl.conf.
2. Put the following lines in the file in order to ensure the your DNS changes do not get blown away
[network]
generateResolvConf = false
3. In a cmd window, run wsl --shutdown
4. Restart WSL2
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file.
6. Put the following line in the file
sudo touch /etc/cloud/cloud-init.disabled
sudo apt-get purge cloud-init
# /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
@colhountech
colhountech / get_short_conf.sh
Last active February 27, 2021 16:19
strip # and blank lines from conf files
grep -v "^#" $1 | grep -v "^\s*$"
@colhountech
colhountech / defluff-ubuntu-vm.sh
Created February 27, 2021 16:33
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
colhountech / AcrylicUI_RoundCorners.cs
Created May 19, 2022 11:53
AcrylicUI Gist - Round Corners
#region Round Corners
private void RoundCorners(bool _isWindows11)
{
if (_isWindows11)
{
var attribute = DWMWINDOWATTRIBUTE.DWMWA_WINDOW_CORNER_PREFERENCE;
var preference = DWM_WINDOW_CORNER_PREFERENCE.DWMWCP_ROUND;
DwmSetWindowAttribute(this.Handle, attribute, ref preference, sizeof(uint));
@colhountech
colhountech / AcrylicUI_NoBorderHack.cs
Last active May 21, 2022 22:19
AcrylicUI Window No Border Hack
#region Window, No Border Hacks
protected override void WndProc(ref Message message)
{
// Resize Window
if (message.Msg == WinUserH.WM_NCHITTEST)
{