This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script installs LLDP in ubuntu systems. It should be run as root. | |
# It is based on the install notes from: https://enterprise-support.nvidia.com/s/article/howto-enable-lldp-on-linux-servers-for-link-discovery | |
TARGET_INTERFACE=eth0 | |
apt-get -y install lldpad | |
lldptool set-lldp -i $TARGET_INTERFACE adminStatus=rxtx | |
lldptool -T -i $TARGET_INTERFACE -V sysName enableTx=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script pushes secrets to multiple AWS accounts. It should be used with IAC where IAC creates the secret for this script to push to. | |
# This ensures that IAC knows where the secrets are stored, but that the secrets themselves can be managed by a separate process. | |
# This script relies on the AWS CLI being installed and configured properly (profiles and auth) with the necessary permissions. | |
# The default behaviour is to update a secret with a new value. To create a new secret, use the -c flag. | |
usage() { echo "Usage: $0 [-p target,aws,profiles] [-s <secret string>] -d \"Description\" -k \"KMS Key Id create only\" -n \"Secret Name\" " 1>&2; exit 1; } | |
while getopts ":cd:kn:p:s:" flag | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Largely followed this post https://itectec.com/ubuntu/ubuntu-speech-recognition-app-to-convert-mp3-to-text/ | |
# Download the show, https://selfhosted.show/49 | |
wget https://aphid.fireside.fm/d/1437767933/7296e34a-2697-479a-adfb-ad32329dd0b0/1cbfb286-6182-404e-a59b-e969e60c7a44.mp3 | |
# Convert it into the format vosk is epxecting | |
ffmpeg -i downloaded-mp3-file.mp3 -ar 16000 -ac 1 file.wav | |
# Install vosk | |
pip3 install vosk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# < declarative subject > (Max 50 char) | |
# One of ["feat","fix","docs","style","refactor","perf","test","chore"]: | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# More detailed explanatory text, if necessary. The blank line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install basics | |
brew install git python nmap docker node nvm wget jq cookiecutter curl git nano | |
brew cask install iterm2 google-chrome | |
# Manually configure iterm2 with pro theme from the below clone | |
git clone https://github.com/mbadolato/iTerm2-Color-Schemes.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am derekmurawsky on github. | |
* I am dmurawsky (https://keybase.io/dmurawsky) on keybase. | |
* I have a public key whose fingerprint is D0A7 74AE F15D 01B7 DA66 39E9 05F7 5B3B 7816 E0AE | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get-SSLSigningAlgorithm { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)] | |
[string]$URL, | |
[Parameter(Position = 1)] | |
[ValidateRange(1,65535)] | |
[int]$Port = 443, | |
[Parameter(Position = 2)] | |
[Net.WebProxy]$Proxy, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Deletes files in specified path older than X days. | |
forfiles -p "C:\path\to\files" -s -m *.* -d -360 -c "cmd /c del @path" | |
REM Alternate way to do it. Deletes all files in current directory older than X days. | |
forfiles -s -m *.* -d -360 -c "cmd /c del @path" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sp_msforeachdb 'use [?]; CREATE USER [MyDBUser] FOR LOGIN [MyDBLogin];EXEC sp_addrolemember ''db_datareader'', ''[MyDBUser]''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CONVERT(CHAR(100), SERVERPROPERTY('193199-WEB1')) AS Server, | |
msdb.dbo.backupset.database_name, | |
msdb.dbo.backupset.backup_start_date, | |
msdb.dbo.backupset.backup_finish_date, | |
msdb.dbo.backupset.expiration_date, | |
CASE msdb..backupset.type | |
WHEN 'D' THEN 'Database' | |
WHEN 'L' THEN 'Log' | |
END AS backup_type, |
NewerOlder