Skip to content

Instantly share code, notes, and snippets.

View gitaarik's full-sized avatar

Rik gitaarik

View GitHub Profile
@benkehoe
benkehoe / py-args-for-bash.sh
Last active August 3, 2023 08:58
Python argument parsing for bash scripts
#!/bin/sh
# MIT No Attribution
#
# Copyright 2020 Ben Kehoe
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
@simov
simov / README.md
Last active March 28, 2024 03:26
Run `node` scripts using `nvm` and `crontab` without hardcoding the node version

Run node scripts using nvm and crontab without hardcoding the node version

cronjob.env.sh

#!/bin/bash

# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
@gitaarik
gitaarik / npmbin.sh
Created March 1, 2016 11:58
Alias to add the `node_modules/.bin/` directory to `$PATH` variable so that you can use executables from node modules.
alias npmbin='echo -e "Setting up npmbin with path:\n$(npm bin)"; export PATH=$(npm bin):$PATH'
@gitaarik
gitaarik / gitprompt.sh
Last active October 1, 2016 00:34
native gitprompt
gitprompt() {
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWSTASHSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM="auto"
export GIT_PS1_SHOWCOLORHINTS=true
export PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
. /usr/lib/git-core/git-sh-prompt
@gitaarik
gitaarik / git_submodules.md
Last active April 27, 2024 17:22
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@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