Skip to content

Instantly share code, notes, and snippets.

View wommy's full-sized avatar

Tommy Williams wommy

View GitHub Profile
# 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 May 3, 2025 05:33
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 May 10, 2025 04:34
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')
# An example Jekyll generator. Utilizes the new plugin system.
#
# 1. Make a _plugins directory in your jekyll site, and put this class in a file there.
# 2. Upon site generation, version.html will be created in your root destination with
# # the version of Jekyll that generated it
module Jekyll
class VersionReporter < Generator
safe true