Skip to content

Instantly share code, notes, and snippets.

View willwm's full-sized avatar

Will Wolff-Myren willwm

View GitHub Profile
# https://win32.io/posts/How-To-Find-Text-PowerShell
Get-ChildItem "C:\path\to\folder" -recurse | Where-Object { (Get-Content $_) -like '*TextToFind*' } | Select-Object { $_.FullName }
# ...as a function:
function Find-TextInFiles($searchPath, $text) {
Get-ChildItem $searchPath -recurse | Where-Object { (Get-Content $_) -like '*$text*' } | Select-Object { $_.FullName }
}
@talyguryn
talyguryn / wildcard-ssl-certificate.md
Last active October 29, 2023 08:57
How to get a wildcard ssl certificate and set up Nginx.

How to get and install a wildcard SSL certificate

In this guide you can find how to resolve the following issues.

Feel free to ask any questions in the comments section below.

@ramsunvtech
ramsunvtech / groupBy.js
Created September 25, 2018 15:07
Group By - ES6
function groupBy(list, props) {
return list.reduce((a, b) => {
(a[b[props]] = a[b[props]] || []).push(b);
return a;
}, {});
}
// Usage.
groupBy([{
id: 1,
@almeidx
almeidx / markdown-text-101.md
Last active August 18, 2025 13:08 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@willwm
willwm / bookmarklet-markdown-link.js
Last active September 22, 2021 21:00 — forked from Rarst/md-link.js
Bookmarklet for markdown link of current page (incl. optional selected text as quote)
@willwm
willwm / bookmarklet-youtube-unsubscribe-all.js
Last active March 25, 2024 03:11
Bookmarklet: Unsubscribe from YouTube channels in bulk
javascript:(() => {
const timeout = 500;
const buttons = document.querySelectorAll("[aria-label^='Unsubscribe from']");
for(let button of buttons) {
setTimeout(() => {
console.group(button.attributes['aria-label'].value);
setTimeout(() => { button.click(); }, timeout);
@pirate
pirate / docker-compose-backup.sh
Last active October 9, 2025 12:11
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
# Get all enabled Windows Features, sorted by FeatureName
Get-WindowsOptionalFeature -Online | Where-Object State -eq "Enabled" | Sort-Object -Property "FeatureName" | Foreach { $_.FeatureName }
@willwm
willwm / preamble.tex
Last active January 23, 2022 02:06
preamble.tex: LaTeX Preamble Template (Will Wolff-Myren)
%% preamble.tex: LaTeX Preamble Template (Will Wolff-Myren) %%
\usepackage{amsmath, amsthm, amssymb, enumerate, setspace}
\usepackage{mathtools} % https://ctan.org/pkg/mathtools
\usepackage{fancyhdr} % Fancy header. ;-)
\usepackage{titlesec} % For chapter/section/subsection customizations
\usepackage{hyperref} % https://www.andy-roberts.net/writing/latex/pdfs
\usepackage{tcolorbox} % For references from the book
\usepackage{relsize} % For resizing fractions in displaymath
\usepackage{marvosym} % For the contradiction lightning bolt
@willwm
willwm / campbell.json
Last active September 2, 2025 06:03
Campbell Color Scheme
{
"name" : "Campbell",
"cursorColor": "#FFFFFF",
"selectionBackground": "#FFFFFF",
"background" : "#0C0C0C",
"foreground" : "#CCCCCC",
"black" : "#0C0C0C",