Skip to content

Instantly share code, notes, and snippets.

View wommy's full-sized avatar

Tommy Williams wommy

View GitHub Profile

DHCP setup of a single node

TL;DR Set up your sole node Proxmox VE install as any other server - with DHCP assigned IP address. Useful when IPs are managed as static reservations or dynamic environments. No pesky scripting involved.


ORIGINAL POST DHCP setup of a single node

Container shell with no password

TL;DR Do not set passwords on container users, get shell with native LXC tooling taking advantage of the host authentication. Reduce attack surfaces of exposed services.


ORIGINAL POST Container shell with no password

# Virtual memory settings.
# Kernel documentation: https://docs.kernel.org/admin-guide/sysctl/vm.html.
# Arch zram: https://wiki.archlinux.org/title/zram#Optimizing_swap_on_zram.
# Gaming tuning: https://pastebin.com/fwzW9whL.
# PopOS tuning: https://github.com/pop-os/default-settings/pull/163.
# MaxPerformanceWizard (MPW) https://gitlab.com/cscs/maxperfwiz/-/blob/master/maxperfwiz.
boot.kernel.sysctl = {
# Tunes how aggressively kernel evicts memory pages until a specific amount of free memory is left for your active working set
## Sweet spot for gaming is 125-200, near 200 makes kswapd swap too aggressive
@llimllib
llimllib / mssql_to_csv.bash
Last active January 8, 2025 02:22
This is a script to convert every table in a Microsoft SQL Server database backup (.bak file) to a .csv file
#!/usr/bin/env bash
# import an MS SQL .bak backup file to an MS SQL database, then export all
# tables to csv. run this script as `import.sh <filename>`. It expects to be
# run in the same directory as the backup file.
# this is only tested on my mac (OS X Catalina). I tried to stick to posix, but
# It will probably require some tweaking for you. I hope it gives a general
# sense of what you need to do at the very least.
@bradtraversy
bradtraversy / docker_wordpress.md
Last active June 29, 2025 03:35
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 5, 2025 13:06
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@josegonzalez
josegonzalez / category.rb
Created August 14, 2010 21:41
Category plugin for Jekyll
module Jekyll
class CategoryIndex < Page
def initialize(site, base, dir, category)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')