I am using the jt command line utility to parse the output
curl -sk "https://$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY@api.softlayer.com/rest/v3/SoftLayer_Product_Package/getAllObjects"| jt [ id % ] name %|grep Load
194 Load Balancers
## Simple script to test writing to json formatted file. | |
#!/bin/bash | |
# Get hostname | |
hostname=`hostname -A` 2> /dev/null | |
# Get distro | |
distro=`python -c 'import platform ; print platform.linux_distribution()[0] + " " + platform.linux_distribution()[1]'` 2> /dev/null |
#!/bin/bash | |
# usage: $0 source_dir [source_dir] ... | |
# where source_dir args are directories containing git repositories | |
red="\033[00;31m" | |
green="\033[00;32m" | |
yellow="\033[00;33m" | |
blue="\033[00;34m" | |
purple="\033[00;35m" |
#!/bin/bash | |
API="<PUSHBULLET API TOKE>" | |
MSG=`pwd` | |
# cd to repo and check if file needs to be added/commited | |
# if so then send pushbullet message | |
curl -u $API: https://api.pushbullet.com/v2/pushes -d type=note -d title="Git Dirs that need commits" -d body="$MSG" |
#!/bin/bash | |
# ================================================================================ | |
# ObjectStorageUploader.sh | |
# © Copyright IBM Corporation 2014. | |
# LICENSE: MIT (http://opensource.org/licenses/MIT) | |
# ================================================================================ | |
#./objectstorageupload.sh dsl-4.4.10.iso 'myContainer/file.vhd' 'username' 'apikey' | |
fileToUpload=$1 |
I am trying to get the Product ID from the billing item ID and something here is not working. | |
``` | |
ryan@galileo ~/php % php getbillingid.php | |
stdClass Object | |
( | |
[allowCancellationFlag] => 1 | |
[cancellationDate] => | |
[categoryCode] => guest_core |
sync |
# Use phusion/baseimage as base image. To make your builds reproducible, make | |
# sure you lock down to a specific version, not to `latest`! | |
# See https://github.com/phusion/baseimage-docker/blob/master/Changelog.md for | |
# a list of version numbers. | |
FROM phusion/baseimage:0.9.18 | |
# Use baseimage-docker's init system. | |
CMD ["/sbin/my_init"] | |
# ...put your own build instructions here... |
import SoftLayer | |
package = 194 | |
from pprint import pprint as pp | |
client = SoftLayer.Client() | |
categoryObjectMask = "mask[isRequired, itemCategory[id, name]]" | |
configurations = client['Product_Package'].getConfiguration( | |
id=package, mask=categoryObjectMask) |
I am using the jt command line utility to parse the output
curl -sk "https://$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY@api.softlayer.com/rest/v3/SoftLayer_Product_Package/getAllObjects"| jt [ id % ] name %|grep Load
194 Load Balancers
import SoftLayer | |
import json | |
object_filter = { | |
'items': { | |
'prices': { | |
'locationGroupId': { | |
'operation': 'is null' | |
} | |
} |