Skip to content

Instantly share code, notes, and snippets.

View trevarj's full-sized avatar

Trevor Arjeski trevarj

View GitHub Profile
#!/bin/sh
echo -e "\e[1mbold\e[0m"
echo -e "\e[3mitalic\e[0m"
echo -e "\e[3m\e[1mbold italic\e[0m"
echo -e "\e[4munderline\e[0m"
echo -e "\e[9mstrikethrough\e[0m"
echo -e "\e[31mHello World\e[0m"
echo -e "\x1B[31mHello World\e[0m"
@trevarj
trevarj / colors.sh
Created March 13, 2023 08:28
Script to show all terminal colors
#!/bin/bash
DEFAULT_COLORS=256
COLORS="${1:-DEFAULT_COLORS}"
for ((n = 0; n < $COLORS; n++)); do
if ((n < 10)); then s=" "; elif ((n < 100)); then s=" "; else s=" "; fi
printf " %s[%d] $(tput setaf $n)%s$(tput sgr0)" "$s" $n "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
"
done
@trevarj
trevarj / textToZ64CompressedImage.java
Last active February 26, 2023 03:25
Convert Unicode to Image and Compress for ZPL - Zebra (^GF for ZPL)
/**
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@trevarj
trevarj / synchronizedDropdownsLol.js
Last active August 18, 2016 11:59
Synchronizes Select Dropdowns - jQuery
$(function(){
$('.testSubjectSelect').change(function() {
var selectedValues = $("option:selected").map(function(){return this.value;});
$('.testSubjectSelect').children('option').not(":contains('-Select a Subject-')").each(function() {
if ($.inArray($(this).val(), selectedValues) > -1 && !this.selected) {
$(this).attr('hidden', true);
} else {
$(this).removeAttr('hidden');
}