Skip to content

Instantly share code, notes, and snippets.

View kbristow's full-sized avatar

Kieran Bristow kbristow

  • Absa
  • South Africa
View GitHub Profile
@kbristow
kbristow / instructions.md
Last active March 7, 2025 10:43
iTerm Setup

How to configure iTerm

PreRequisites

  • Install iTerm brew install --cask iterm2
  • Install font (may not be required depending on theme used) brew tap homebrew/cask-fonts && brew install --cask font-source-code-pro

Setup Prezto

Install

@kbristow
kbristow / get-kubeconfigs.sh
Last active February 20, 2023 07:22
Pull all Rancher KubeConfig files locally
#/bin/bash
# $1 rancher url (e.g. https://rancher.my-company.co.za)
# $2 rancher bearer token
# $3 overwrite current kubeconfig with resulting config (default false)
if [[ -z "${1}" ]]; then
echo "Must specify Rancher url to use as first argument (e.g. https://rancher.my-company.co.za). Exiting!"
exit 1
else
RANCHER_URL="${1}"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
@kbristow
kbristow / sh
Created March 19, 2019 12:20
Set JDK version function for .bashrc
# Sourced directly from https://zeroturnaround.com/rebellabs/switching-java-versions-on-the-command-line/. Credit to Oleg Shelajev
removeFromPath () {
export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
}
# set and change java versions
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
@kbristow
kbristow / himawari.ps1
Last active February 4, 2016 09:31 — forked from MichaelPote/himawari.ps1
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@kbristow
kbristow / springer-free-maths-books.md
Created December 29, 2015 07:56 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@kbristow
kbristow / The Technical Interview Cheat Sheet.md
Last active August 21, 2016 18:02 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.