Skip to content

Instantly share code, notes, and snippets.

View hassenius's full-sized avatar

Hans Kristian Moen hassenius

  • ServiceNow
  • Dublin, Ireland
View GitHub Profile
@hassenius
hassenius / bulkdeleteAllSwiftObjectsAndContainers.sh
Created April 9, 2014 09:52
bulkdeleteAllSwiftObjectsAndContainers.sh
#!/bin/bash
################################################################################
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
apiKey="<pasteKeyHere>"
userName="<pastUsernameHere>"
endPoint="https://ams01.objectstorage.softlayer.net/auth/v1.0/"
@hassenius
hassenius / upgrade_cci.rb
Last active August 29, 2015 13:58
Upgrade CCI
################################################################################
# upgrade_cci.rb
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
require 'rubygems'
require 'softlayer_api'
$SL_API_USERNAME = "set me"
@hassenius
hassenius / upgrade_cci.py
Last active August 29, 2015 13:58
Upgrade CCI
################################################################################
# upgrade_cci.py
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
import SoftLayer.API
import datetime
apiUsername = ' set me '
@hassenius
hassenius / get_package_options.rb
Last active September 2, 2016 20:52
Package Options
################################################################################
# get_package_options.rb
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
require 'rubygems'
require 'softlayer_api'
require 'optparse'
require 'pp'
@hassenius
hassenius / order_multiple_raid_groups.rb
Last active August 29, 2015 13:59
SoftLayer Order multiple RAID Groups
################################################################################
# order_multiple_raid_groups.rb
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
require 'rubygems'
require 'softlayer_api'
$SL_API_USERNAME = " PLEASE SET ME "
@hassenius
hassenius / order_single_raid_group.rb
Last active August 29, 2015 13:59
SoftLayer Order single RAID group
################################################################################
# order_single_raid_group.rb
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
require 'rubygems'
require 'softlayer_api'
$SL_API_USERNAME = " PLEASE SET ME "
@hassenius
hassenius / sl_config_finder.rb
Created May 21, 2014 17:11
Find Softlayer Monthly Bare Metal Servers based on cpu,memory and/or disk requirements
#!/usr/bin/ruby
################################################################################
# sl_config_finder.rb
# ©Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
require 'rubygems'
require 'softlayer_api'
require 'optparse'
@hassenius
hassenius / janitor.sh
Last active November 17, 2015 21:55
OpenStack Project Janitor
#!/bin/bash
#################################################################################
## janitor.sh
## ©Copyright IBM Corporation 2014.
## Brought to life by hans.moen@ie.ibm.com
## LICENSE: MIT (http://opensource.org/licenses/MIT)
#################################################################################
################################################################################
##
## janitor.sh -- employed to clean up other peoples mess
heat_template_version: 2013-05-23
description: Create a VM with Floating IP and security group to allow all ssh
parameters:
key_name:
type: string
# default: hk_key
label: Keypair Name
description: Name of a KeyPair to enable SSH access to the instance.
@hassenius
hassenius / install-heat.sh
Created August 31, 2015 14:36
Bash script to install single node OpenStack Heat with mariadb and rabbitmq
#!/bin/bash
################################################################################
# install-heat.sh
# ©Copyright IBM Corporation 2015.
#
# Bash script to install single node OpenStack Heat with mariadb and rabbitmq
# LICENSE: MIT (http://opensource.org/licenses/MIT)
################################################################################
echo "Script loosely based on https://github.com/sushilkm/heat-standalone/blob/master/install-heat"