Skip to content

Instantly share code, notes, and snippets.

@echo off
set /p domain="Enter Domain: "
set OPENSSL_CONF=../conf/openssl.cnf
if not exist .\%domain% mkdir .\%domain%
set dir="%cd%"
cd ..\php
..\php\extras\openssl\openssl.exe req -config %dir%\cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %dir%\%domain%\server.key -x509 -days 365 -out %dir%\%domain%\server.crt
@airways
airways / youtube unsubscribe all.js
Last active September 3, 2021 00:30
Remove all youtube subscriptions
/*
* Instructions:
* 1) Go to https://www.youtube.com/feed/channels
* 2) Right click and click Inspect
* 3) Click Console tab
* 4) Paste the snippet below.
* 5) Keep page open until you see "Done" in a dialog box.
* 6) You may need to refresh the page and paste the snippet again. Sometimes it can't get them all beacuse of how YouTube loads the list.
*/
var subs = Array.from(document.getElementsByClassName('ytd-subscribe-button-renderer'));
@airways
airways / fix-filenames.ps1
Created February 18, 2022 21:51
Remove non-ascii characters from filenames
# This will allow for the files to be zipped by the built-in Explorer "Compress to ZIP file" command
function FixFilenames {
pwd
$Files = gci
$Files | ForEach-Object {
$OldName = $_.Name
$NewName = $OldName -replace "[^\u0020-\u007F]", "_"
if ( $OldName -ne $NewName ) {
echo "$OldName -> $NewName"
@airways
airways / migrate_model.py
Created May 27, 2022 17:14
This is a reusable model migration tool which we use internally to move data from one # host to another for our hosted CRM.
################################################################################
# NNS CRM #
################################################################################
# This is a reusable model migration tool which we use internally to move data from one
# host to another for our hosted CRM. Might be useful to other people using Django in
# multi-tenant situation.
#
# This has been released under the MIT License by Near North Software, LLC.
#
# https://www.nearnorthsoftware.com/
@airways
airways / meeseeks.php
Last active September 27, 2022 01:48
I'm Mr. Meeseeks the PHP Encryption Tool, look at me!
<?php
// I'm Mr. Meeseeks the PHP Encryption Tool, look at me!
//
// Cobbled together with great trepidation by Blueapples.
//
// Visit me at Blueapples.org
//
// Version 1.0, 2022-09-26.
define('LF', "\n");