Skip to content

Instantly share code, notes, and snippets.

View elmundio87's full-sized avatar

Edmund Dipple elmundio87

View GitHub Profile
@elmundio87
elmundio87 / all-iam-permissions.json
Created November 4, 2023 17:57
All AWS IAM Permissions JSON
{
"a4b": [
"ApproveSkill",
"AssociateSkillWithSkillGroup",
"AssociateSkillWithUsers",
"CompleteRegistration",
"CreateAddressBook",
"CreateBusinessReportSchedule",
"CreateConferenceProvider",
"CreateContact",
.gl-text-truncate {
white-space: unset !important;
}
div[data-qa-selector="job_link"] {
max-width: 1000px !important;
width: 1000px !important;
}
div.ci-job-component > div {
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
#
# Extended vs Simple?
# Extended includes an adjustable delay between keypresses and better handling of numbers
#
# Setup
# Create a service: open Automator, create new service, receive no input,
# use any application, run applescript code below, save.
@elmundio87
elmundio87 / main.tf
Created February 17, 2021 19:48
OS-specific commands in Terraform local-exec
locals {
platform = substr(pathexpand("~"),0,1) == "/" ? "linux" : "windows"
command_map = {
windows = {
interpreter = "powershell",
command = "While( -not $(az account list-locations)){ Start-Sleep 5 }; echo Done!"
}
linux = {
interpreter = "bash",
command = "while ! az account list-locations){ Sleep 5 }; echo Done!"
@elmundio87
elmundio87 / get_primary_ip_address.sh
Last active November 16, 2020 21:23
A script to get the primary IP address on linux or mac
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
ip route get 1 | awk '{print $NF;exit}'
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
ipconfig getifaddr en0
else
# Unknown.
fi
@elmundio87
elmundio87 / export-mpn-msdn-subscriptions.js
Last active September 18, 2020 08:16
Export all active Visual Studio MSDN subscriptions in an MPN account
/*
Open this page and log in: https://partner.microsoft.com/en-us/dashboard/mpn/membership/benefits/visualstudio
The script will wait 15 seconds to wait for the subscription lists to load before exporting the data.
*/
var output = ""
callback = function(){
var msdnObj = $("table[aria-label='Visual Studio subscriptions'] span")
@elmundio87
elmundio87 / ddns_provider.conf
Created December 15, 2019 10:50 — forked from superbob/ddns_provider.conf
Namecheap Synology DSM DDNS provider
#Insert this at the end of /etc.defaults/ddns_provider.conf
[Namecheap]
modulepath=/usr/syno/bin/ddns/namecheap.php
queryurl=https://dynamicdns.park-your-domain.com/update
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Toast|yes
Mid Sussex Golf Club|yes
Disney Store|yes
Grange Hotels|yes
Little Chef|yes
Zopa|no
Avery We Print|yes
Esure|no
Dansk|yes
The Entertainer|yes
find *.png -exec magick "{}" -alpha discrete -channel rgb -evaluate add 100% +channel "{}" \;
@elmundio87
elmundio87 / gist:b37c823b0d3606e58c4a3da66674ad42
Last active November 1, 2018 15:57
Useful VSCode regexes

Obvs make sure you have the regex switch turned on in Find/Replace

Inverse Search

Search: ^(?!.*expression).*

Find and replace everything except something

Search: search(.*)anotherthing