Skip to content

Instantly share code, notes, and snippets.

View fnzv's full-sized avatar
🌐

Sami fnzv

🌐
View GitHub Profile
@fnzv
fnzv / delete.js
Created February 28, 2021 10:48 — forked from tidusjar/delete.js
Delete all movies that have been 'downloaded' in Radarr. Mass/bulk deleting.
// Go to Radarr and click 'settings' => 'general'.
// Open the JavaScript Console in Google Chrome (View => Developer => Javascript Console)
// Past the following in. Hit enter and away you go.
const key = document.getElementsByClassName('x-api-key')[0].value;
if (!key) {
alert('Navigate to /settings/general and run again');
}
@fnzv
fnzv / iterm2.md
Created March 19, 2020 16:42 — forked from cgswong/iterm2.md
iterm2 shortcut cheat sheet

Note: You may have to go into Preferences (⌘,) -> Profiles -> Keys and enable Left option (⌥) key acts as: +Esc for the option commands to work.

Modifier Symbol
Option
Command
Control
Caps Lock
Shift
@fnzv
fnzv / self-signed-certificate-with-custom-ca.md
Created February 12, 2020 13:35 — 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
@fnzv
fnzv / ec2.ini
Created April 10, 2019 19:32 — forked from parzonka/ec2.ini
Configuration for ansibles dynamic ec2 inventory. Forked from https://github.com/ansible/ansible/tree/devel/contrib/inventory/ec2.ini and configured for eu-central-1 and performance.
# Ansible EC2 external inventory script settings
#
[ec2]
# to talk to a private eucalyptus instance uncomment these lines
# and edit edit eucalyptus_host to be the host name of your cloud controller
#eucalyptus = True
#eucalyptus_host = clc.cloud.domain.org
@fnzv
fnzv / dynamic-nginx-module-ubuntu-18.04.sh
Created January 12, 2019 12:08 — forked from excid3/dynamic-nginx-module-ubuntu-18.04.sh
How to compile a dynamic nginx module for Ubuntu 18.04
# Install dependencies that nginx was originally compiled with
sudo apt install libperl-dev libgeoip-dev libgd-dev
# Get the nginx source
wget https://nginx.org/download/nginx-1.14.0.tar.gz
tar zxf nginx-1.14.0.tar.gz
# Get the module source
wget https://github.com/fdintino/nginx-upload-module/archive/master.zip
unzip master.zip
@fnzv
fnzv / install.sh
Created July 17, 2018 13:26 — forked from popstas/install.sh
Install LAMP with ansible from geerlingguy
sudo apt-get install -y python-dev python-pip
sudo pip install ansible
sudo ansible-galaxy install geerlingguy.apache geerlingguy.mysql geerlingguy.php
wget https://gist.githubusercontent.com/popstas/61a5ddce08fe1a269f62576808cee54e/raw/de7bceea261f5a76fd88d8673046e5e18be7e35a/lamp.yml
ansible-playbook -i 'localhost,' -c local lamp.yml
@fnzv
fnzv / gist:b44c9737506f8b6892c33af6f4c29436
Created June 26, 2018 08:59 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@fnzv
fnzv / gist:f375fe897ec935b1f3dd284edb6d7c85
Last active May 9, 2018 19:21 — forked from jmn/gist:4de857259b1dfc54ab80b5682af935ad
Building h2load (of nghttp2) on Ubuntu 16.04
#! /bin/bash
# https://nghttp2.org/documentation/h2load-howto.html
sudo apt-get update
sudo apt-get install -y g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libc-ares-dev libjemalloc-dev cython python3-dev python-setuptools libjemalloc-dev libspdylay-dev
git clone https://github.com/nghttp2/nghttp2.git && cd nghttp2 && autoreconf -i && automake && autoconf && ./configure --enable-app && make && make install
./src/h2load --help
@fnzv
fnzv / haproxy.cfg
Created February 22, 2018 09:37 — forked from thisismitch/haproxy.cfg
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@fnzv
fnzv / ipa_mail_passexpiration.sh
Created January 22, 2018 14:21 — forked from miticojo/ipa_mail_passexpiration.sh
send email for password expiration
#!/bin/bash
# Source: http://vmhacks.com/freeipa-password-expiry-notification-script-for-red-hat-identity-management/
# notifies people a set number of days before expiry, once via email
# open a kerberos ticket using keytab authentication
# the following keytab file was made using ktutil with rc4-hmac
/usr/bin/kinit admin@YOURDOMAIN.COM -k -t /sextoys/admin.keytab