Skip to content

Instantly share code, notes, and snippets.

View dcolebatch's full-sized avatar
👋
I may be slow to respond.

David Colebatch dcolebatch

👋
I may be slow to respond.
View GitHub Profile
@dcolebatch
dcolebatch / README.md
Created May 8, 2018 12:59
Delete AWS Glacier vault, including all archives, from bash.

Delete Entire AWS Glacier Vaults

This script will delete all archives in an AWS Glacier vault, then delete the vault. It Assumes you have already got an AWS credential profile setup. See aws configure --profile or AWS Docs here

Prerequisites

Aside from bash, you'll need:

@dcolebatch
dcolebatch / tidal_analyze_mississauga.ca.js
Created April 6, 2018 19:58
JSON output from running `tidal analyze mississauga.ca --type JSON`
{
"http://mississauga.ca": [
{
"categories": [
"Ecommerce"
],
"name": "Oracle Commerce"
},
{
"categories": [
@dcolebatch
dcolebatch / container_instance_example.tf
Created April 4, 2018 02:35
Snippet of Terraform for Azure Container Instance configuration
resource "azurerm_container_group" "aci-api" {
name = "aci-api"
location = "${azurerm_resource_group.serverless.location}"
resource_group_name = "${azurerm_resource_group.serverless.name}"
ip_address_type = "public"
os_type = "linux"
container {
name = "meow"
image = "dcolebatch/random-cats"
stages:
- build
- deploy
build:
stage: build
script:
- bundle install --path=vendor
- bundle exec jekyll build
artifacts:
expire_in: 3 month
@dcolebatch
dcolebatch / Enabling WinRM HTTPS Listener
Created February 9, 2018 00:47 — forked from pavank/Enabling WinRM HTTPS Listener
Enabling WinRM HTTPS Listener
1)Generate SSL Certificate with one of these options
-CA Authority(e.g:Versign)
-Active Directory Certificate Services
-Self Signed(Not to be used in Production)
Code : cd 'C:\Program Files (x86)\Windows Kits\8.0\bin\x64\'
makecert -r -pe -n "CN=3dmxvm-solar.cloudapp.net " -b 01/01/2012 -e 01/01/2022 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
2) Export Certificate in .pfx format to store into Trusted Root Store of Client Machine
3) Enable WinRm Trusted Source IP addresses
@dcolebatch
dcolebatch / nlb_cluster.yml
Created March 27, 2017 17:52
Example of an ansible playbook for replacing an NLB cluster
---
- name: CREATE NODES,POOL,VIRTUAL SERVER FOR MyNLBcluster
hosts: f5
connection: local
gather_facts: false
vars:
default_partition: "_NLB_Partition"
pool_name: "POOL-PROD_MyNLBcluster"
vip_basename: "VIP_PROD_MyNLBcluster"
@dcolebatch
dcolebatch / nlb_discovery.ps1
Created March 27, 2017 17:27
Discover how much NLB is running in your environment
$output = @{}
$servers = Get-SCVirtualMachine | Select Name, VirtualNetworkAdapters
$nics = $servers | ForEach-Object {
$NIC = $_.VirtualNetworkAdapters
ForEach ($adapter in $NIC)
{
If ($adapter.VirtualNetwork -like "*FrontEnd*")
{
@dcolebatch
dcolebatch / torquebox_deploy_failure
Created April 29, 2015 15:30
Bundler issue when deploying .knob archives to torquebox 3.1.1 standalone
15:27:50,474 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "lightmesh-knob.yml" (runtime-name: "lightmesh-knob.yml")
15:27:52,505 INFO [org.hornetq.core.server] (pool-7-thread-1) HQ221003: trying to deploy queue jms.queue./queues/torquebox/lightmesh/tasks/torquebox_backgroundable
15:27:52,548 INFO [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-2) Using default implementation for ThreadExecutor
15:27:52,563 INFO [org.quartz.core.SchedulerSignalerImpl] (MSC service thread 1-2) Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
15:27:52,563 INFO [org.quartz.core.QuartzScheduler] (MSC service thread 1-2) Quartz Scheduler v.2.1.5 created.
15:27:52,563 INFO [org.quartz.simpl.RAMJobStore] (MSC service thread 1-2) RAMJobStore initialized.
15:27:52,563 INFO [org.quartz.core.QuartzScheduler] (MSC service thread 1-2) Scheduler meta-data: Quartz Scheduler (v2.1.5) 'jboss.deployment.unit."lightmesh-knob.yml".job_sched

Keybase proof

I hereby claim:

  • I am dcolebatch on github.
  • I am dcolebatch (https://keybase.io/dcolebatch) on keybase.
  • I have a public key whose fingerprint is 42B6 7789 0994 A3C0 48A8 7EA7 235C 9477 94C6 4762

To claim this, I am signing this object:

@dcolebatch
dcolebatch / gist:98fb0cc62d77f071dfd8
Created October 20, 2014 13:19
torquebox user's env vars
torquebox@ubuntu:~$ env|grep jruby
JRUBY_HOME=/opt/torquebox/current/jruby
torquebox@ubuntu:~$ env|grep gem
GEM_HOME=/usr/local/rvm/gems/ruby-2.1.2
PATH=/usr/local/rvm/gems/ruby-2.1.2/bin:/usr/local/rvm/gems/ruby-2.1.2@global/bin:/usr/local/rvm/rubies/ruby-2.1.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/rvm/bin
GEM_PATH=/usr/local/rvm/gems/ruby-2.1.2:/usr/local/rvm/gems/ruby-2.1.2@global