Skip to content

Instantly share code, notes, and snippets.

View npearce's full-sized avatar
🏠
Working from home is now totally redundant, right?

Nathan Pearce npearce

🏠
Working from home is now totally redundant, right?
View GitHub Profile
@npearce
npearce / Better_Error.js
Last active July 31, 2018 15:20
F5 iControl LX - How to access additional error response data (lines 25 & 26)
/**
* Apply the new, or modified, service definition to the BIG-IP
* @param {Object} service_def retireved from GitHub repo
*
* @returns {Object} AS3's declaration processing results
*/
MyWorker.prototype.applyServiceDefinition = function (service_def) {
return new Promise((resolve, reject) => {
@npearce
npearce / BigStats_GraphiteDB_Grafana_Setup.md
Last active February 8, 2019 20:20
BigStats Setup for: F5 BIG-IP -> StatsD -> GraphiteDB -> Graphana Dashboards

Create the Grafana Dashboard Container for BigStats on AWS

Updated: August 21, 2018

NOTE: This setup is used as an exporter destination for BigStats: https://npearce.github.io

Create the Instance

On the AWS Console:

  1. In 'Instances', click 'Luanch Instance'.
  2. Select 'Amazon Linux 2 AMI (HVM), SSD Volume Type'
@npearce
npearce / BigStats_ApacheKafka_Setup.md
Last active September 5, 2018 03:28
BigStats Setup for: F5 BIG-IP -> Apache Kafka message bus

Create the Apache Kafka Container for BigStats on AWS

Updated: August 21, 2018

NOTE: This setup is used as an exporter destination for BigStats: https://npearce.github.io

Create the Instance

On the AWS Console:

  1. In 'Instances', click 'Luanch Instance'.
  2. Select 'Amazon Linux 2 AMI (HVM), SSD Volume Type'
@npearce
npearce / iControl_LX_Package_Operations.md
Last active August 24, 2018 21:46
F5 iControl LX workers: Install and Uninstall RPM's

About

The F5 iControl LX Framework enables engineers to create custom Nodejs control-plane actions/workflows for the F5 BIG-IP hardware and software appliances.

Put the RPM on the BIG-IP

Copy the RPM using scp (or some SCP capabe GUI tool).

SCP instructions

@npearce
npearce / node-tgz-permissions.js
Last active November 15, 2018 18:38
Create gzipped tarballs in nodejs with correct owners & permissions.
//NOTE: the source permissions need to be set appropriately, also.
// npm i --save targz
const targz = require('targz')
targz.compress({
src: '/tmp/mydirectory',
dest: 'output/filename.tgz',
tar: {
dmode: 0775, // Directories: rwxrwxr-x
@npearce
npearce / bash-filesystem_permissions.sh
Last active November 15, 2018 18:24
*nix filesystem permissions
// using `type -d` and `type -f` to isolate
// Change all directories to 775, and ignore files
find /home/user -type d -exec chmod 775 {} \;
// Change all files to 664, and ignore directories
find /home/user -type f -exec chmod 664 {} \;
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@npearce
npearce / Install-Openwhisk.md
Last active November 29, 2018 20:31
Install Openwhisk on Amazon AMI w/ docker-compose
@npearce
npearce / README.md
Last active February 5, 2023 14:45
Useful git commands

Useful git commands

This gist is for collecting git commands I don't use often enough to remember, but probably waste too much time trying to find when I need them.