Skip to content

Instantly share code, notes, and snippets.

View rivman's full-sized avatar
🏠
Working from home

RivDesign rivman

🏠
Working from home
View GitHub Profile
# This is a anonymized version of the script I use to renew all my SSL certs
# across my servers. This will not work out of the box for anyone as your network will be
# different. But may be useful starting place for others.
#
# I use a cronjob that runs this every week. It only replaces certificates when a certificate has been renewed.
# Renews/creates cert from letsencrypt & places it where it needs to be.
# Currently, that is:
# * Nginx (local for plex)
# * Plex Media Server
@rivman
rivman / replace_synology_ssl_certs.sh
Created October 29, 2023 18:50 — forked from catchdave/replace_synology_ssl_certs.sh
CLI script to programmatically replace SSL certs on Synology NAS
#!/bin/bash
#
# *** For DSM v7.x ***
#
# How to use this script:
# 1. Get your 3 PEM files ready to copy over from your local machine/update server (privkey.pem, fullchain.pem, cert.pem)
# and put into a directory (this will be $CERT_DIRECTORY).
# Personally, I use this script (https://gist.github.com/catchdave/3f6f412bbf0f0cec32469fb0c9747295) to automate steps 1 & 4.
# 2. Ensure you have a user setup on synology that has ssh access (and ssh access is setup).
# This user will need to be able to sudo as root (i.e. add this line to sudoers, <USER> is the user you create):
@rivman
rivman / reset.css
Created April 25, 2023 17:37 — forked from Asjas/reset.css
Modern CSS Reset - Andy Bell
// https://piccalil.li/blog/a-modern-css-reset
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt
https://justdomains.github.io/blocklists/lists/easyprivacy-justdomains.txt
https://raw.githubusercontent.com/0Zinc/easylists-for-pihole/master/easyprivacy.txt
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts
https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
https://v.firebog.net/hosts/Easyprivacy.txt
https://v.firebog.net/hosts/Prigent-Ads.txt
https://adaway.org/hosts.txt
https://blocklistproject.github.io/Lists/ads.txt
https://ente.dev/api/blocklist/tv
@rivman
rivman / Country-Code-Phone-emoji-flags.html
Created October 30, 2022 11:48
Country codes phone numbers prefixes + EMOJI flags
<!-- Country codes ISO CODES & phone number prefixes & Emoji Flags -->
<div class="country-select-wrapper">
<select class="country-select text-center" id="iso_code" name="iso_code">
<option value="AF">Afghanistan +93 🇦🇫</option>
<option value="AX">Aland Islands +358 🇦🇽</option>
<option value="AL">Albania +355 🇦🇱</option>
<option value="DZ">Algeria +213 🇩🇿</option>
<option value="AS">American Samoa +1 🇦🇸</option>
<option value="AD">Andorra +376 🇦🇩</option>
<option value="AO">Angola +244 🇦🇴</option>
@rivman
rivman / toolbox-context-menu.ps1
Created July 20, 2022 16:30 — forked from jcwillox/toolbox-context-menu.ps1
PowerShell script to automatically add context menu entries for Jetbrains IDEs
<#
.SYNOPSIS
Automatically add context menu entries for Jetbrains IDEs.
.PARAMETER Name
The name or names of the IDEs to add context menus for, use -List to see available IDEs.
.PARAMETER BasePath
The path to the Toolbox apps directory, defaults to "$env:LOCALAPPDATA\JetBrains\Toolbox\apps".
.PARAMETER Global
Install context menu entries in HKLM registry (machine wide), requires running as administrator.
.PARAMETER Force
@rivman
rivman / rasp-config.sh
Last active July 11, 2022 18:48
Raspbery Pi 3b With Buster Display portrait UHH 4k (2160 x 3840) Rotate CW Working 07-20222
Custom settigns on RDS 18.3
RIVDESIGN
Raspberian Buster
Linux version 5.10.103-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1529 SMP Tue Mar 8 12:21:37 GMT 2022
Hardware info:
CPU Platform: "BCM2835" ARMv7 Processor rev 4 (v7l)
wlan0 Broadcom BCM43430 WLAN card
eth0 Standard Microsystems SMSC9512/9514 Fast Ethernet Adapter
@rivman
rivman / Debug explorer.exe with .dmp
Created June 17, 2022 12:37
Debug explorer.exe with .dmp
If you copy and paste the following in Notepad and save as a .reg file (save with the .reg extension and give it any name such as dump.reg), then right-click the .reg file and select "Merge" to add to the registry, a .dmp file at the time explorer.exe crashes should be created in the C:\CrashDumps folder:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\explorer.exe]
"DumpFolder"=hex(2):43,00,3a,00,5c,00,43,00,72,00,61,00,73,00,68,00,44,00,75,\
00,6d,00,70,00,73,00,00,00
@rivman
rivman / Emoji_Complete_List.html
Created March 18, 2022 10:35
Full list of Emoji (for use in Web / Chat (Telegram Bot...) / API )
<!--
https://www.unicode.org/emoji/charts/full-emoji-list.html
-->
<a target="_blank" href="https://www.unicode.org/emoji/charts/full-emoji-list.html">Full Emoji List</a>
@rivman
rivman / css_fix_missing_semicolon_regex.txt
Created March 2, 2022 12:00 — forked from nicorellius/css_fix_missing_semicolon_regex.txt
REGEX to find missing semicolon in CSS and replace in PHPStorm IDE
(?<=\w[^,;{}])$