Skip to content

Instantly share code, notes, and snippets.

View colindekker's full-sized avatar

Colin Dekker colindekker

View GitHub Profile
#!/bin/bash
INPUT=samples.csv
mkdir "$HOME/samples"
cd "$HOME/samples"
curl "https://gist.githubusercontent.com/colindekker/c3e892355f041910af2c4cad40621ddc/raw/8e18d947bc050fcb51031437deae654712e8f287/gistfile1.csv" --output $INPUT
OLDIFS=$IFS
IFS=','
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read Url
$d="c:\samples";mkdir $d;cd $d;Invoke-WebRequest -Uri "https://gist.githubusercontent.com/colindekker/c3e892355f041910af2c4cad40621ddc/raw/8e18d947bc050fcb51031437deae654712e8f287/gistfile1.csv" -OutFile "samples.csv";$p = 1;Import-Csv .\samples.csv |% {$u = $($_.Url);$n=$($p.ToString().PadLeft(3, "0") + " - " + $_.Url.split("/")[-1..-1]);Invoke-WebRequest -Uri $u -OutFile $n;$p = $p + 1;};explorer $d
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Url
https://archive.org/download/90ssamplecds/AKAI%20Alpine%20Instruments.7z
https://archive.org/download/90ssamplecds/AKAI%20Anime%20Sound%20FX.7z
https://archive.org/download/90ssamplecds/AKAI%20S-Series%20CD-ROM%20Sound%20Library%20VOL-1.7z
https://archive.org/download/90ssamplecds/AKAI%20S-Series%20CD-ROM%20Sound%20Library%20VOL-2.7z
https://archive.org/download/90ssamplecds/AKAI%20S-Series%20CD-ROM%20Sound%20Library%20VOL-3.7z
https://archive.org/download/90ssamplecds/AKAI%20S-Series%20CD-ROM%20Sound%20Library%20VOL-4.7z
https://archive.org/download/90ssamplecds/AKAI%20S-Series%20CD-ROM%20Sound%20Library%20VOL-5.7z
https://archive.org/download/90ssamplecds/AKAI%20S-Series%20CD-ROM%20Sound%20Library%20VOL-6.7z
https://archive.org/download/90ssamplecds/AKAI%20S-Series%20CD-ROM%20Sound%20Library%20VOL-7.7z
@colindekker
colindekker / mp3.sh
Last active November 30, 2019 21:10
History Of Hardcore Gabber 1992-2000 playlist download shell script
#!/bin/bash
# ------------------------------------------
# wget -O - https://gist.githubusercontent.com/colindekker/8b461e492785dc4a055c5d4e866f0d1f/raw/ | bash
# ------------------------------------------
INPUT=mp3.csv
mkdir "$HOME/mp3"
cd "$HOME/mp3"
@colindekker
colindekker / mp3.ps1
Last active March 20, 2020 19:06
History Of Hardcore Gabber 1992-2000 playlist download script
#$d="c:\mp3";mkdir $d;cd $d;Invoke-WebRequest -Uri "https://gist.githubusercontent.com/colindekker/7446842082b5098a633cef846d6faf7b/raw/cbee64d2883e6bdd407f19f18f5024b3293d166c/mp3.csv" -OutFile "mp3.csv";$p = 1;Import-Csv .\mp3.csv |% {$u = $($_.Url);$n=$($p.ToString().PadLeft(3, "0") + " - " + $_.Url.split("/")[-1..-1]);Invoke-WebRequest -Uri $u -OutFile $n;$p = $p + 1;};explorer $d
$d="c:\samples";mkdir $d;cd $d;Invoke-WebRequest -Uri "https://gist.githubusercontent.com/colindekker/c3e892355f041910af2c4cad40621ddc/raw/8e18d947bc050fcb51031437deae654712e8f287/gistfile1.csv" -OutFile "samples.csv";$p = 1;Import-Csv .\samples.csv |% {$u = $($_.Url);$n=$($p.ToString().PadLeft(3, "0") + " - " + $_.Url.split("/")[-1..-1]);Invoke-WebRequest -Uri $u -OutFile $n;$p = $p + 1;};explorer $d
@colindekker
colindekker / mp3.csv
Created November 29, 2019 17:50
History Of Hardcore Gabber 1992-2000 playlist URLs
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Url
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/3StepsAhead-DropItoriginalMix1995.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/3StepsAhead-Hardcore1994.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/3StepsAhead-ItsDelicious1997.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/3StepsAhead-PaintItBlack1998.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/3Village_EveryHumanBeingOnEarth2000.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/50OfTheDreamteam-OpenSesamethemeFromHell1999.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/6-pack-DrunkenPieceOfShit1994.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/Activator-RotterdamComeOn1996.mp3
https://archive.org/download/HistoryOfHardcoreGabber1992-2000/AlternativeCreators-TheBeast1996.mp3
@colindekker
colindekker / ca_intermediate-openssl.cnf
Last active March 4, 2020 23:35
(intermediate authority) openssl.cnf to create a development CA
# OpenSSL intermediate CA configuration file.
# Copy to `/root/ca/intermediate/openssl.cnf`.
[ ca ]
# `man ca`
default_ca = CA_default
[ CA_default ]
# Directory and file locations.
dir = /root/ca/intermediate
@colindekker
colindekker / ca_root-openssl.cnf
Last active March 4, 2020 23:35
(root authority) openssl.cnf to create a development CA
# OpenSSL root CA configuration file.
# Copy to `/root/ca/openssl.cnf`.
[ ca ]
# `man ca`
default_ca = CA_default
[ CA_default ]
# Directory and file locations.
dir = /root/ca
wget https://gist.githubusercontent.com/colindekker/20d00ddbc08bca34b6b30da191d0c60a/raw/certbot-authhook-az-cli-annotated.sh
AZURE_ACCOUNT=certbottest
AZURE_DNS_GROUP=networking
AZURE_DNS_ZONE=domain.tld
AZURE_DNS_DOMAIN=subdomain.domain.tld
AZURE_WEBAPP=subdomainapp
AZURE_WEBAPP_GROUP=subdomainapp
@colindekker
colindekker / certbot-authhook-az-cli-annotated.sh
Created August 12, 2019 22:34
CertBot manual auth hook for Azure DNS using Azure CLI
#!/bin/bash
# The hook supports 2 actions, 'create' and 'delete', passed as the first argument.
# When 'create' is passed in, a validation TXT record is added,
# 'delete' cleans up that record after validation
ACTION=$1
# The second the name of the Azure Account that contains the DNS Zone Resource
AZ_ACCOUNT=$2
echo $AZ_ACCOUNT
# set the name of the Azure Resource Group that contains the DNS Zone Resource