Skip to content

Instantly share code, notes, and snippets.

View gjanco's full-sized avatar

Gregory Janco gjanco

  • LogDNA
  • Pittsburgh, Pa
View GitHub Profile
@gjanco
gjanco / 01-machine-imaging-tips.md
Last active December 23, 2023 03:19
Kubernetes Local Setup

Download Linux Image

Create Bootable thumb drive

Needs to be at least 4GB

diskutil list  # note the devices seen
# insert flash drive
diskutil list   # note the new device seen, e.g. /dev/disk2
diskutil unmountDisk /dev/diskN
sudo dd if=ubuntu-14.04-server-amd64.iso of=/dev/rdiskN bs=1m
@gjanco
gjanco / docker-for-mac.md
Created December 16, 2021 02:25 — forked from BretFisher/docker-for-mac.md
ssh into docker

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@gjanco
gjanco / jstack-perpetual.sh
Created January 13, 2021 20:17
java-debugging
#!/bin/bash
# Adaptation of script from eclipse.org http://wiki.eclipse.org/How_to_report_a_deadlock#jstackSeries_--_jstack_sampling_in_fixed_time_intervals_.28tested_on_Linux.29
if [ $# -eq 0 ]; then
echo >&2 "Usage: jstackSeries <pid>"
echo >&2 " Defaults: count = 10, delay = 1 (seconds)"
exit 1
fi
pid=$1 # required
@gjanco
gjanco / Build-Related.ps1
Created January 4, 2019 20:23
Build Related