Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2017 Free Software Foundation, Inc.
timestamp='2017-04-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2017 Free Software Foundation, Inc.
timestamp='2017-05-27'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
@repodevs
repodevs / macOS.sh
Created December 12, 2018 14:56
gpg: signing failed: Inappropriate ioctl for device macOS
❱ git config user.signingKey 38AF394C
❱ git config commit.gpgSign true
❱ echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
@mxey
mxey / Vagrantfile
Created December 5, 2018 11:39
Vagrantfile disable audio
machine.vm.provider "virtualbox" do |v|
# Prevent VirtualBox from interfering with host audio stack
v.customize ["modifyvm", :id, "--audio", "none"]
end
@npearce
npearce / install-docker.md
Last active April 24, 2026 20:03
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
@luebken
luebken / CKAD-Exam.md
Last active August 23, 2019 22:41
Resources to learn for the CKAD Exam
@miguelmota
miguelmota / ssm_parameter.go
Last active September 26, 2023 10:36
AWS SSM Go SDK parameter store example
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ssm"
)
@jasonk000
jasonk000 / hpa-top.js
Last active August 3, 2018 22:02
top-for-hpa
#!/usr/bin/env node
const fs = require('fs')
const columnify = require('columnify')
const exec = require('sync-exec')
let stdinBuffer = exec('kubectl get hpa --all-namespaces --output json').stdout
let results = JSON.parse(stdinBuffer.toString())
// stdinBuffer = exec('kubectl get pods --all-namespaces | grep -v Running').stdout
@boneskull
boneskull / README.md
Last active December 16, 2025 11:19
example of how to debug mocha v4 if hanging

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js
@navicore
navicore / jsonpath.md
Last active January 24, 2024 17:25
for getting multiple kubernetes yaml fields from kubectl via jsonpath

get name and image and startTime

kubectl get pods -Ao jsonpath='{range .items[*]}{@.metadata.name}{" "}{@..spec..containers[*].image}{" "}{@.status.phase}{" "}{@.status.startTime}{"\n"}{end}'

edited 10/2022 with .. and A suggestions