Skip to content

Instantly share code, notes, and snippets.

@n1mh
n1mh / changing_user_transmission-daemon.sh
Last active July 8, 2020 20:49
Changing user for transmission-daemon in raspberry pi
#!/bin/bash
sudo /etc/init.d/transmission-daemon stop
sudo chown -R pi:pi /etc/transmission-daemon
sudo rm -rf ~pi/.config/transmission-daemon
sudo mv /etc/transmission-daemon ~pi/.config/
sudo ln -s ~pi/.config/transmission-daemon /etc/transmission-daemon
sudo chown pi:pi /etc/default/transmission-daemon
@CrimsonRoselia
CrimsonRoselia / gist:f9c25496a145f30ae7c4
Created July 15, 2015 20:43
plaintext version of copypasta from /r/pitchforkemporium
ANGRY AT OP? WANT TO JOIN THE MOB? I'VE GOT YOU COVERED!
COME ONE DOWN TO /r/pitchforkemporium
I GOT 'EM ALL!
|-------------|-------------|-------------|
| Traditional | Left Handed | Fancy |
|-------------|-------------|-------------|
| ---E | Ǝ--- | ---{ |
|-------------|-------------|-------------|
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active March 20, 2024 08:12
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"