Skip to content

Instantly share code, notes, and snippets.

View manojuppala's full-sized avatar
:octocat:
i'm busy

manoj uppala manojuppala

:octocat:
i'm busy
View GitHub Profile
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
#!/bin/bash
if [[ "$1" == "neovim" || "$1" == "all" ]]; then
# install neovim
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 55F96FCF8231B6DD
sudo apt update
sudo apt install neovim
elif [[ "$1" == "apps" || "$1" == "all" ]]; then
# install applications
@manojuppala
manojuppala / 256colortest.sh
Created February 27, 2022 16:11
to test 256 colour compatibility of your terminal emulator.
#!/bin/bash
set -eu # Fail on errors or undeclared variables
printable_colours=256
# Return a colour that contrasts with the given colour
# Bash only does integer division, so keep it integral
function contrast_colour {
local r g b luminance