Skip to content

Instantly share code, notes, and snippets.

View kevintrannz's full-sized avatar
🎯
Focusing

Kevin Tran kevintrannz

🎯
Focusing
  • Kronus Consulting NZ
  • Auckland, NZ
View GitHub Profile
@kurahaupo
kurahaupo / xr
Last active November 25, 2021 03:45
Script using "xrandr" to configure multi-head display
#!/bin/bash
die() { echo "$*" >&2 ; exit 1 ; }
declare -a R=( normal right inverted left ) # rotation descriptions
declare -A S
declare -A DX
declare -a EX
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@tilo
tilo / prettify_json.rb
Created September 17, 2012 18:37
Ruby script to pretty print JSON on the command line (comes with Ruby's json Gem)
#!/usr/bin/env ruby
require 'json'
require 'fileutils'
include FileUtils
# Parses the argument array _args_, according to the pattern _s_, to
# retrieve the single character command line options from it. If _s_ is
# 'xy:' an option '-x' without an option argument is searched, and an
# option '-y foo' with an option argument ('foo').