Skip to content

Instantly share code, notes, and snippets.

View mattfield's full-sized avatar
🫠

Matt Field mattfield

🫠
View GitHub Profile
;--------------------------------------------
; colors ;
;--------------------------------------------
[colors]
bar_bg = #1d1f21
bar_fg = #c5c8c6
border_col = #1d1f21
# /etc/udev/rules.d/20-bt-auto-enable-a2dp.rules
# hxss
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="/home/hxss/.config/scripts/xorg/bt-auto-enable-a2dp.sh"
@HardenedArray
HardenedArray / Efficient Encrypted UEFI-Booting Arch Installation
Last active October 22, 2023 12:14
An effcient method to install Arch Linux with encrypted root and swap filesystems and boot from UEFI. Multi-OS, and VirtualBox, UEFI-booting are also supported.
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems and boot from UEFI.
# Note this encrypted installation method, while perfectly correct and highly secure, CANNOT support encrypted /boot and
# also CANNOT be subsequently converted to support an encrypted /boot!!! A CLEAN INSTALL will be required!
# Therefore, if you want to have an encrypted /boot or will want an encrypted /boot system at some point in the future,
# please ONLY follow my encrypted /boot installation guide, which lives here:
alias REGIONS_NAMES='aws ec2 describe-regions | jq ".Regions[].RegionName" -r'
alias TERMINATE='aws ec2 terminate-instances --instance-ids'
alias STOP='aws ec2 stop-instances --instance-ids'
alias START='aws ec2 start-instances --instance-ids'
alias MON_ENA='aws ec2 monitor-instances --instance-ids'
alias MON_DIS='aws ec2 unmonitor-instances --instance-ids'
RESIZE() {
aws ec2 modify-instance-attribute --instance-id "$1" --instance-type "{\"Value\": \"$2\"}"
}
DESC() {
@colinvh
colinvh / aws.md
Last active May 22, 2024 09:43
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@lewisd32
lewisd32 / iptableflip.sh
Created April 15, 2015 18:20
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
@drkarl
drkarl / gist:739a864b3275e901d317
Last active October 17, 2023 10:43
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.
@soleblaze
soleblaze / gist:975bc2b0e5e69137fd08
Last active August 21, 2017 18:21
/etc/X11/xorg.conf.d/50-synaptics.conf
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
# Enables Palm Detection to prevent bad clicks
# This seems to work on PS/2, but not on i2c
Option "PalmDetect" "1"
Option "PalmMinWidth" "8"
Option "PalmMinZ" "100"
# Enable clickpad support