Skip to content

Instantly share code, notes, and snippets.

View toricls's full-sized avatar
🐔
Cock a doodle doo

Tori Hara toricls

🐔
Cock a doodle doo
View GitHub Profile
@nrjdalal
nrjdalal / QEMU-Silicon-Mac-Virtualization.md
Last active February 1, 2024 05:31
Create Virtual Machines using QEMU on Silicon based Apple Macs

Install QEMU on Silicon based Apple Macs (June 2021)

Option 1 - Automatically

zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)"

Option 2 - Manually

  • Install Xcode command line tools

xcode-select --install
@inductor
inductor / git-list.sh
Created April 9, 2021 03:35
git-list.sh
for f in $(git ls-files -z content/ja/docs/ \
| xargs -0 -n1 -I{} -- git log -1 --format="%ai {}" {} \
| awk '{print $4}' \
| sed -e 's/ja/en/'); do git diff --name-only origin/release-1.17 origin/release-1.18 -- $f; done
@jamesls
jamesls / alias
Last active January 15, 2023 21:52
AWS CLI v2 upgrade aliases.
[toplevel]
# Put this in ~/.aws/cli/alias
# and you'll have an "aws upgrade"
# and an "aws check-upgrade" command.
#
# Only works on macOS and installs using
# the .pkg installer.
#
upgrade = !f() {
curl -s "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "/tmp/AWSCLIV2.pkg"
@sean-smith
sean-smith / hpcg.md
Last active May 8, 2019 23:12
AWS ParallelCluster + AWS Batch

AWS ParallelCluster + AWS Batch

Today I'm going to demonstrate running High Performance Conjucate Grandients (HPCG) in a containerized workload. This takes advantage of AWS ParallelCluster, AWS Batch, and OpenMPI.

First install aws-parallelcluster:

$ pip install aws-parallelcluster
@rdump
rdump / kubectl-multi-version-brews.md
Last active April 4, 2024 15:20
kubectl multi-version brews (kubernetes-cli formula)

kubectl multi-version brews

Applicability

The instructions below apply to older versions of Homebrew which still provide switch capability.

For current Homebrew, you'll likely need to keep Versions around, and build locally. Here's my versions repository https://github.com/rdump/homebrew-versions

MacPorts is now keeping versioned installations available as well, by default.

@pottava
pottava / localstack-sample.md
Last active October 29, 2018 11:22
AWS CLI with Atlassian/LocalStack

1. Create a docker-compose.yml

version: '2.1'

services:

  localstack:
    image: atlassianlabs/localstack:0.5.0
    ports:
package main
import (
"bufio"
"context"
"flag"
"fmt"
"os"
"os/signal"
"sync"
@ekristen
ekristen / check_docker_container.sh
Last active July 15, 2024 09:29
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@jpluscplusm
jpluscplusm / README.md
Last active February 22, 2020 22:36
A primitive Double A (AAA-minus-Accounting) RBAC system implemented in declarative Nginx config

Nginx Double A

A primitive Double A (AAA-minus-Accounting) RBAC system implemented in declarative Nginx config.

Background

So I noticed https://github.com/alexaandru/elastic_guardian, a simple AAA reverse-proxy to sit in front of Elasticsearch. Reading the source and comments tickled my "why is this in code not config?" funnybone.

I asked @alexaandru (https://twitter.com/jpluscplusm/status/438339557906735104) who told me it was mostly the resulting complexity of the nginx config he tried that prompted him to write it.

#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.