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 */
@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 / 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[^,;{}])$
@rivman
rivman / UserInput.php
Created November 18, 2021 08:51 — forked from chtombleson/UserInput.php
Helper Class for sanitizing user input in PHP
<?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Christopher Tombleson <chris@cribznetwok.com>
*
* 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
@rivman
rivman / Apple tvOS 13 screensaver
Last active July 30, 2021 16:52 — forked from 1a57danc3/Apple tvOS 13 screensaver
List liens Video HS 1980x1080 HDR + HEVC ///RIVDESIGN
Seals
url-4K-HDR :
https:\\sylvan.apple.com\Aerials\2x\Videos\SE_A016_C009_HDR_20190717_3m30s_HDR_4K_HEVC.mov
url-4K-SDR :
https:\\sylvan.apple.com\Aerials\2x\Videos\SE_A016_C009_SDR_20190717_3m30s_SDR_4K_HEVC.mov
url-1080-H264 :
https:\\sylvan.apple.com\Videos\SE_A016_C009_SDR_20190717_3m30s_SDR_2K_AVC.mov
url-1080-HDR :
https:\\sylvan.apple.com\Aerials\2x\Videos\SE_A016_C009_HDR_20190717_3m30s_HDR_2K_HEVC.mov
url-1080-SDR :
@rivman
rivman / entries.json
Last active July 30, 2021 14:16
Apple TV 4K Aerial screensavers entry list. https://sylvan.apple.com/Aerials/2x/Aerial Movie Location Apple TV Screensavers.json
{
"version" : 1,
"initialAssetCount" : 4,
"assets" : [
{
"id" : "6154CA95-ED90-446A-9C29-F46EDA2B3741",
"url-1080-SDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_2K_SDR_HEVC.mov",
"url-1080-HDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_2K_HDR_HEVC.mov",
"url-4K-SDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_4K_SDR_HEVC.mov",
"url-4K-HDR" : "https://sylvan.apple.com/Aerials/2x/Videos/DB_D011_C009_4K_HDR_HEVC.mov",

here are the latest set of urls for the apple 4k sdr videos/screensavers ( https://9to5mac.com/2018/09/17/tvos-12-features/ ) which includes the nasa/ISS space flyovers:

the url was found here:

JohnCoates/Aerial#463 (comment)

quote:

"The format changed somewhat; you need to extract the JSON out of here https://sylvan.apple.com/Aerials/resources.tar. The JSON includes the URLs to the videos and the time markers for the tvOS 12 captions as a dictionary, keyed by time. The values of this dictionary are keys which can be found in the strings plists."

@rivman
rivman / unlimited_trials_babeledit.txt
Created July 10, 2021 11:16
Activate BabelEdit temporarily / Unlimited trial
Obviously for educative purposes only.
Furthermore, this DOESN'T activate BabelEdit permanently.
If you like the software, buy it, the devs deserve it.
Since I have no money to buy it, I discovered a workaround for unlimited trials.
It's quite a annoying workaround, but ... it works!
Firstly go to "c:\windows\system32\drivers\etc\" and open the "hosts" file in Notepad/Notepad++/VSCode/Sublime/Atom/whatever as admin (if you don't open it as admin, it won't let you save it).
Add this line at the end of the file: