Cowsay is one of those packages you just end up installing randomly on just about any client over time.
And if your using ansible you may be in for a little surprise:
[Read More]Published directly from my personal knowledge base.
Cowsay is one of those packages you just end up installing randomly on just about any client over time.
And if your using ansible you may be in for a little surprise:
[Read More]Django’s CSRF protection is usually a great thing, but when building (API) endpoints meant to be accessed by scripts/third parties it gets in the way of that.
This is how to disable it:
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
@method_decorator(csrf_exempt, name='dispatch')
class MyView(View):
pass
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def my_view(request):
pass
Since early 2019 the sprig
library used by helm
provides a concat
function that does exactly this.
Go check out their website, it’s incredibly good at explaining itself.
To me, a backend heavy developer, HTMX is the frontend framework I like to use because:
Think before you enable this, it could be a security risk
Options
, then click Continue
Utilities
menu select Startup Security Utility
Security Policy
Reduced Security
Allow user management of kernel extensions from identified developers
The 1Password CLI op
works either in connection with a client app, like on the Mac,
or standalone, useful on a server.
# Login
eval $(op signin)
# Get favorites
op item list --vault "Private" --favorite
# Get a specific item
op item get <ID>
# !! Important: Sign out at the end
op signout
Helpers to more easily work with the op
cli.
1login() {
eval $(op signin)
}
alias 1signout="op signout"
1search() {
term=$1
if [ -n "$2" ]
then
vault="$2"
else
vault="Private"
fi
echo "Searching for '$term' in vaut '$vault'"
op item list --vault "$vault" --long | grep "$term" --ignore-case
}
1get() {
op item get $*
}
Things I do to be a good code reviewee.
[Read More]A simple Python client to interact with ArgoCD.
[Read More]If you use ssh-agent with an encrypted ssh key it does not persist when you open a new terminal window.
Use keychain
instead.
sudo apt install keychain
.bashrc
or .zshrc
# Repeat this line for all keys you want to unlock and use this way
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa
source $HOME/.keychain/wsl-sh
Sometimes you may want to commit only the files you have changed and not any newly created files,
this can easily be achieved by this command: git commit -a
This is my checklist for publishing a new post on my blog:
hugo new content/posts/<slug of post>.md
hugo server -bind=0.0.0.0