Skip to content

Instantly share code, notes, and snippets.

View awfulwoman's full-sized avatar
🏠
Working from home

Charface awfulwoman

🏠
Working from home
View GitHub Profile
@awfulwoman
awfulwoman / gist:f78f1dac139cbdbfac8a2e1a54cb0d5f
Last active January 23, 2021 11:15 — forked from adeluccar/gist:d105299f2d5af55e3e96f9b989e7eb48
How to Flatten the History of a Git Repository Safely

BACK UP YOUR REPO BEFORE DOING ANYTHING LIKE THIS!!

git checkout --orphan future-main
git add -A  # Add all files and commit them
git commit -m "Initial commit"
git branch -D main  # Deletes the main branch
git branch -m main  # Rename the current branch to main
git push -f origin main  # Force push main branch to github
git gc --aggressive --prune=all # remove the old files
@awfulwoman
awfulwoman / mt_viki_remote
Created June 29, 2023 19:14 — forked from mharsch/mt_viki_remote
Arduino replaces MT-VIKI KVM remote module for changing / polling selected KVM input
#include <math.h>
// connected to 'D+' pin on mini USB
const int input_pin = 11;
// connected to 'D-' pin on mini USB
const int output_pin = 12;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
@awfulwoman
awfulwoman / bash-template.sh
Created August 4, 2023 21:39 — forked from PhilipSchmid/bash-template.sh
Bash script template (incl. logging functions)
#!/bin/bash
#################################
# Constants / global variables
#################################
LOGFILE='example.log'
LOGLEVEL='INFO'
#################################
# Functions

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.