Skip to content

Instantly share code, notes, and snippets.

@iamzhout
iamzhout / tmux.md
Created October 15, 2018 01:04 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@iamzhout
iamzhout / kubectl.md
Created October 15, 2018 00:55 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@iamzhout
iamzhout / tunnel.sh
Last active March 4, 2018 08:41 — forked from dserodio/tunnel.sh
Shell script to start/stop an EC2 instance to use as a ssh tunnel
#!/bin/bash
# Start/stop an EC2 instance to use as a ssh tunnel
# requires: 1. the aws package locally -- sudo apt-get install awscli
# 2. run `aws configure` to config aws environment beforehand
#
# usage: ./tunnel.sh start (spin up EC2 and create the tunnel)
# ./tunnel.sh stop (stop the EC2 instance to save money)
# ./tunnel.sh status (show EC2 instance detail)
# ./tunnel.sh resume (in case your tunnel is interrupted but the EC2 instance is still running)
@iamzhout
iamzhout / gist:38ad08d2d8eacda8184f0766639641a5
Created April 14, 2017 01:32
NoSleep.exe - Prevents Screensaver and PC Locking - By Mike.Langford
# original URL: https://www.symantec.com/connect/downloads/readynosleepexe-prevents-screensaver-and-pc-locking
#AutoIt3Wrapper_icon=nosleep.ico
Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",1)
$AboutItem = TrayCreateItem("About")
TrayItemSetOnEvent(-1,"ReadList")
TrayCreateItem("")
@iamzhout
iamzhout / gist:94b4e766b73104a92a82
Created October 26, 2015 15:49
go-lang-idea-plugin stack trace while doing "Go fmt file"
2015-10-26 20:22:46
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.66-b17 mixed mode):
"JobScheduler FJ pool 0/4" #1826 daemon prio=6 os_prio=0 tid=0x00000000232d5800 nid=0x4b0c waiting on condition [0x000000001b31f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e787b280> (a jsr166e.ForkJoinPool)
at jsr166e.ForkJoinPool.awaitWork(ForkJoinPool.java:1756)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1694)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)