Skip to content

Instantly share code, notes, and snippets.

View MarkDarwin's full-sized avatar

Mark Darwin MarkDarwin

View GitHub Profile
@MarkDarwin
MarkDarwin / block.js
Created August 22, 2022 15:32 — forked from rtfpessoa/nextdns.js
nextdns.io Block Youtube Ads
const configID = "<CONFIG-ID>";
const ignoreDomainsSet = new Set([
"clients.l.google.com",
"clients1.google.com",
"clients2.google.com",
"clients3.google.com",
"clients4.google.com",
"clients5.google.com",
"clients6.google.com",
@MarkDarwin
MarkDarwin / README.md
Created October 21, 2018 19:56 — forked from ErikFontanel/README.md
Firefly backup and restore scripts

firefly-backup

This script automatically creates a tar.gz archive of the firefly database and copies it to a secure offsite location.

It does NOT save the encryption key. Store that somewhere else securely (e.g. password manager).

I have firefly-backup running via a daily cronjob.

firefly-restore

This restores a .tar.gz backup of the firefly database to a docker volume. The script takes the filename of the backup as an argument and assumes a static location where those files are found.

@MarkDarwin
MarkDarwin / wsus-update.ps1
Created January 19, 2017 17:10 — forked from jacobludriks/wsus-update.ps1
wsus-update
Function WSUSUpdate {
$Criteria = "IsInstalled=0 and Type='Software'"
$Searcher = New-Object -ComObject Microsoft.Update.Searcher
try {
$SearchResult = $Searcher.Search($Criteria).Updates
if ($SearchResult.Count -eq 0) {
Write-Output "There are no applicable updates."
exit
}
else {
@MarkDarwin
MarkDarwin / Add-TestUsers.ps1
Created January 19, 2017 16:43 — forked from tylerapplebaum/Add-TestUsers.ps1
Create test users in Active Directory with realistic data from https://randomuser.me
<#
.SYNOPSIS
Create realistic-looking Active Directory accounts.
Written by Tyler Applebaum.
Version 0.1
Last Updated Nov 19 2016
.LINK
https://gist.github.com/tylerapplebaum/d692d9d2e1335b8b111927c8292c5dac
https://randomuser.me/