Skip to content

Instantly share code, notes, and snippets.

View crazywolf132's full-sized avatar
😈

Brayden Moon crazywolf132

😈
  • CBA
  • Australia
  • 13:22 (UTC +11:00)
View GitHub Profile
@mgedmin
mgedmin / jenkins.md
Last active April 3, 2019 17:33
Installing latest Jenkins on Ubuntu

Installing upstream Jenkins

  1. Make sure you don't have Jenkins installed from Ubuntu repositories -- you'll get problems if you try to mix it with upstream packages
apt-get purge jenkins --auto-remove
  1. Add the upstream Jenkins package repository
@pieman72
pieman72 / hex_to_ansi
Last active October 18, 2024 17:31
Hex to ANSI color code converter
function hex_to_ansi(){
# Get the individual color components as decimals
HEX=$(echo "$1" | tr -d '#' | tr '[:lower:]' '[:upper:]')
DIGITS=$(( ${#HEX} / 3 ))
R=$(( 16#${HEX:$(( DIGITS * 0 )):$DIGITS} ))
G=$(( 16#${HEX:$(( DIGITS * 1 )):$DIGITS} ))
B=$(( 16#${HEX:$(( DIGITS * 2 )):$DIGITS} ))
# Handle grey ramp
if [ "`echo $(( R-G )) | tr -d '-'`" -lt 16 ]\