Skip to content

Instantly share code, notes, and snippets.

View mauvehed's full-sized avatar
:shipit:
hax.

mauvehed mauvehed

:shipit:
hax.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mauvehed on github.
  • I am mauvehed (https://keybase.io/mauvehed) on keybase.
  • I have a public key whose fingerprint is C171 5060 CB31 B1AE 2246 25BD 17E0 D1A7 9C39 7504

To claim this, I am signing this object:

The general idea here is to always use a new branch to create new content you want to submit to the original parent repo, known as upstream. In doing so you'll never work directly from your master branch, you'll instead use new branches for each feature or speaker note.

With this idea in mind, your master branch should always be an up to date version of the upstream repo. The following commands will overwrite your master branch every time you run this. Any changes made there will be destroyed and only the most recent changes from upstream/master will remain. This is intentional, but requires that you never make changes to your local master branch.

1. Add remote upstream (only required the first time):

git remote add upstream git@github.com:REPLACE-YOUR-REPO-NAME/REPLACE-YOUR-REPO-NAME.git

2. Verify it was added (optional):

git remote -v

1. Temporarily disable blocking

pihole disable

2. Find which list is blocking the domain

pihole -q <domain>

3. Remove list from master file

/etc/pihole/adlist.list

4. Sync pihole with master list

@mauvehed
mauvehed / Upgrade Git Repos.sh
Created June 14, 2017 00:43
Small script to update a folder full of various git repos
#!/bin/bash
CWD=$(pwd)
for ii in "$CWD"/*; do
cd $ii
echo ""
echo "Updating $ii"
git checkout master
git pull
@mauvehed
mauvehed / gist:6a06eab671c0a2aeca1979154ac19a16
Last active April 18, 2018 15:46 — forked from carlosmcevilly/gist:2221249
fix git commit with wrong email address in git config, before pushing
If:
- you add and commit with the wrong email address in git, and
- your remote has a hook set up to prevent you from pushing with the bad address
Then you need to amend the author of your commit before push can succeed:
1. fix your email address in git config:
$ git config user.name "Your Name"
#!/usr/bin/python
import sqlite3
import os
import urllib
import unicodedata
import getopt
import sys
import codecs
# Find unscanned files not in Plex database but on filesystem
@mauvehed
mauvehed / Dockerfile
Created April 3, 2020 21:01 — forked from Popsiclestick/Dockerfile
Dockerfile example with best practices
### Generic Dockerfile demonstrating good practices
### Imports
# Bad. You risk both the stability and security of your application
# You don't know what they might merge into their image or who they may give control of the project
# https://twitter.com/b0rk/status/1226856930875932672/photo/1
FROM random-person/golang:latest
# Bad-ish. We don't need Ubuntu, it comes with unnecessary bloat
# FROM: https://askubuntu.com/a/1285102/747165
# In Ubuntu 20.04 LTS and Ubuntu 20.10, I removed snapd following this steps:
# stop snapd services
sudo systemctl stop snapd && sudo systemctl disable snapd
# purge snapd
sudo apt purge snapd
# remove no longer needed folders
rm -rf ~/snap
sudo rm -rf /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd
@mauvehed
mauvehed / markdown_cheatsheet.md
Created June 6, 2021 21:21
GitHub Markdown Cheatsheet

From: tchapi/markdown-cheatsheet

Markdown Cheatsheet


Heading 1

Markup :  # Heading 1 #
@mauvehed
mauvehed / docker-compose.yml
Last active May 3, 2022 15:33
valheim docker-compose.yml
version: "3"
services:
valheim:
restart: always
image: mbround18/valheim:latest
environment:
- PORT=2456
- NAME="Server name goes here"
- PASSWORD="server_password_here"
- TZ=America/Chicago