Skip to content

Instantly share code, notes, and snippets.

View mksvdmtr's full-sized avatar
💭
UNIX is very simple, it just needs a genius to understand its simplicity.

mksvdmtr

💭
UNIX is very simple, it just needs a genius to understand its simplicity.
View GitHub Profile
@mksvdmtr
mksvdmtr / sentry-raw.sh
Created July 9, 2024 13:09 — forked from ezy/sentry-raw.sh
CURL request to sentry without an SDK
# Replace <sentry_key>, <sentry-url> and <project-id> to formulate your CURL request. Don't forget to add a trailing slash to URL otherwise you'll get wierd CSRF errors!
curl -X POST --data '{ "exception": [{ "type": "$ErrorMessage"}] }' -H 'Content-Type: application/json' -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=<sentry_key>, sentry_client=raven-bash/0.1" https://<sentry-url>/api/<project-id>/store/
@mksvdmtr
mksvdmtr / self-signed-certificate-with-custom-ca.md
Created July 27, 2021 13:12 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@mksvdmtr
mksvdmtr / migrate-fish-history-to-zsh.py
Created June 9, 2020 16:13 — forked from mateuspontes/migrate-fish-history-to-zsh.py
Migrate fish history to zsh shell (python 2.7)
import os
import re
def fish_to_zsh(cmd):
return (cmd.replace('; and ', '&&')
.replace('; or ', '||'))
with open(os.path.expanduser('~/.zsh_history.test'), 'a') as o:
with open(os.path.expanduser('~/.local/share/fish/fish_history')) as f:
for line in f:

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@mksvdmtr
mksvdmtr / nginx.conf
Created June 26, 2019 12:24 — forked from un33k/nginx.conf
Enable Nginx to send Content-Dispositions on specific files
server {
listen *:80;
server_name www.example.com;
rewrite ^(.*) http://example.com $1 permanent;
}
server {
listen *:80;
server_name example.com;