Tutorials

603 posts

Setup a Workspace for Go

Before you can start writing Golang code. You first need to set up a Workspace. A workspace is just a folder that will store all your Golang related stuff. In my case I’ll create a workspace called ‘go_project’: $ mkdir /root/go_project A workspace needs to have 3 top level folders […]Read more »

Installing Golang

Installing Golang is really easy, just following the instructions in the official guide. For example, for RHEL/CentOSm we would do something like: golang_archive_filename=go1.10.3.linux-amd64.tar.gz curl -o ${golang_archive_filename} https://dl.google.com/go/${golang_archive_filename} tar -C /usr/local -xzf ${golang_archive_filename} cd /usr/local/go/bin cp -rfp /usr/local/go/bin/* /usr/bin/ However here are a few other ways to install Golang: RHEL/CentOS install […]Read more »

Golang Tutorial

What is Golang? Golang (aka G0) is a relatively new programming language Google that has taken the IT world by storm. It was released in 2009 and already some of the biggest applications are written in Go, including Docker, Terraform, and Kubernetes. This is a series of bitesize tutorials that’ll […]Read more »

AWS Cost Explorer CLI demo – filtering costs by cost allocation tags

Here’s a quick example: $ cat filter.json { “Tags”: { “Key”: “role”, “Values”: [“webserver”] } } $ aws ce get-cost-and-usage –time-period Start=$(date +”%Y-%m-%d” –date=”-24 hours”),End=$(date +”%Y-%m-%d”) –granularity=DAILY –metrics BlendedCost –filter file://filter.json RESULTSBYTIME True TIMEPERIOD 2018-08-09 2018-08-08 BLENDEDCOST 22.30 USD References: http://blog.xi-group.com/2015/01/small-tip-how-to-use-aws-cli-filter-parameter/ https://medium.com/@nachomillangarcia/prometheus-alerts-for-aws-daily-costs-3374137d1371

RHCE – rough notes

page 4: systemctl –type=service list all running services: systemctl –list-units –type=service list all services, running and not running: systemctl –list-units –type=service page 6: lists the units that this unit depends on: systemctl list-dependencies UNIT shows what other services depends on the following unit: systemctl list-dependencies UNIT –reverse this forcefully disables […]Read more »