Skip to content

Instantly share code, notes, and snippets.

View gitaarik's full-sized avatar

Rik gitaarik

View GitHub Profile
@gitaarik
gitaarik / git_bash_prompt.sh
Last active May 17, 2019 23:29
Alters bash to make working with Git in the shell easier. Will set the current repository and branch name in the prompt and makes `g` an alias to `git`.
#!/bin/bash
_git_has_commits() {
if git rev-parse --verify HEAD > /dev/null 2>&1; then
return 0
else
return 1
fi
@gitaarik
gitaarik / git-pre-commit-check-misspelling
Last active December 10, 2021 16:35
Pre-commit git-hook that looks for misspelled words and if found notifies the committer about them and aborts the commit. I made it because some developers in my team misspelled classnames/methodnames/variables, and the misspellings kept coming back after they were fixed. This will prevent some misspellings from entering the repository. You can …
#!/bin/bash
declare -a words=(resourse initialise construkt)
declare -a misspellings
i=0
for word in ${words[@]}
do
@gitaarik
gitaarik / south_unran_migration_check.py
Last active December 19, 2015 15:09
Django Middleware that checks if you ran all South migrations. If not, it will throw an exception. Make sure to only use this middleware in development!
from south import migration
from south.models import MigrationHistory
class SouthUnranMigrationCheck(object):
def process_request(self, request):
'''
Checks if you ran all South migrations. If not, it will throw an
exception (DidNotApplyAllMigrations).
@gitaarik
gitaarik / temporary-email-address-domains
Last active May 5, 2023 00:53 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0845.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
10minutemail.net
12houremail.com
12minutemail.com