Skip to content

Instantly share code, notes, and snippets.

View kirkbrady's full-sized avatar

Kirk Brady kirkbrady

  • Sydney, Australia
View GitHub Profile
@jamesinc
jamesinc / aws-ui-shorter-shortcuts.user.js
Last active June 5, 2022 22:36
A Tampermonkey script to replace various AWS console service names with acronyms, so they take up less space in the shortcuts bar.
// ==UserScript==
// @name AWS UI scrubber
// @namespace https://github.com/jamesinc
// @version 1.5
// @description Make AWS Console shortcuts take up less space
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @match https://phd.aws.amazon.com/*
// @grant none
// @run-at document-end
@regnauld
regnauld / ipam-tools.md
Last active November 6, 2023 01:27
Overview of IPAM/DCIM tools - July 2016
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@akaleeroy
akaleeroy / Conjoined-Twins.md
Last active July 3, 2022 19:22
Conjoined Twins - IFTTT-style application actions using auditing and scheduled tasks under Windows

Conjoined Twins

IFTTT-style application actions using auditing and scheduled tasks under Windows

Conjoined Twins IFTTT-style application actions PowerShell script demo

How it works

The script audits a trigger application to make it raise an event when it's executed, then schedules a task to run an action command on that event. For example an automation script, or a batch file, or another app.

Advantages

Function Get-Direction()
{
Param(
[Parameter(Mandatory=$true,Position=0)] $Origin,
[Parameter(Mandatory=$true,Position=1)] $Destination,
[Parameter(Position=2)] [ValidateSet('driving','bicycling','walking')] $Mode ="driving",
[Switch] $InMiles
)
@idlethreat
idlethreat / gist:64e412f7ca46f8b4f949
Created July 17, 2015 02:34
Powershell Logging Loop
# Implement FreePhysicalMemory log item, if necessary. This runs once.
try
{
# create a new event log type of "FreePhysicalMemory"
[System.Diagnostics.EventLog]::CreateEventSource("FreePhysicalMemory", "System")
}
catch
{
# ignore if the above fails.
}
@atifaziz
atifaziz / VisualCron.ps1
Last active March 25, 2023 02:30
PowerShell scripts for VisualCron
# Copyright (c) 2014 Atif Aziz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@mrinaudo
mrinaudo / LICENSE
Last active October 27, 2021 18:37
Basic Template Builder for AWS VPC - Interactively generate basic AWS CloudFormation-based AWS VPC templates.
The MIT License (MIT)
Copyright (c) 2014 Matteo Rinaudo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: