Skip to content

Instantly share code, notes, and snippets.

@earendildev
earendildev / ASCII ColoR Codes
Created Jul 18, 2022 — forked from dominikwilkowski/README.md
ANSI codes for cli controled output
View ASCII ColoR Codes
# ANSI escape codes
[ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) can be printed to a shell to as instructions.
The below is a list of codes I have used often in my CLI programs and I find myself looking up over and over again.
A great article about it can be found [here](https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html).
## Content
- [Colors](#colors)
@earendildev
earendildev / colors
Created Jul 18, 2022 — forked from dtmilano/colors
Shows terminal colors
View colors
#! /bin/bash
n=32
arg=setaf
text='Hello World! This is %s %d'
_help()
{
printf 'usage: %s [--help|-H] [--16] [--256] [-t|--tiny] [--background|-b]\n' "$(basename $0)"
exit 0
@earendildev
earendildev / xterm-256color.md
Created Jul 18, 2022 — forked from shawnbot/xterm-256color.md
Make OS X Terminal respect 256 colors in screen
View xterm-256color.md

1. Ensure that Terminal declares itself as "xterm-256color"

Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to xterm-256color.

2. Build a version of screen that supports 256 colors

This is easy with homebrew:

brew install screen
@earendildev
earendildev / keybase.md
Created Jun 25, 2022
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am earendildev on github.
  • I am earendil (https://keybase.io/earendil) on keybase.
  • I have a public key whose fingerprint is CDF0 E1D2 9587 A21C 2F18 3595 D344 9C00 D551 D6F8

To claim this, I am signing this object:

@earendildev
earendildev / reinstall-xcode.sh
Last active Jun 10, 2022
This will delete and purge Xcode from the system and then proceed to reinstall it back (MacOS)
View reinstall-xcode.sh
#! /bin/bash
#########################################################
# To Download and Install/Run
# $ sudo -H su -c "$(curl -fsSL https://gist.githubusercontent.com/earendildev/c77791827ab6a3a87bfa3b8d8bb786e2/raw --output $HOME/reinstall-xcode.sh)"
# Created by earendil.dev@gmail.com
#########################################################
# Kill XCode Process
@earendildev
earendildev / create-swap.sh
Last active Jun 10, 2022
Creating a SWAP partition and viewing free space
View create-swap.sh
#!/bin/sh
#########################################################
# To Download and Install/Run
# $ sudo -H su -c "$(curl -fsSL https://gist.githubusercontent.com/earendildev/727016da258bd110393c8ba50d0a1253/raw --output $HOME/create-swap.sh)"
# Created by earendil.dev@gmail.com
#########################################################
@earendildev
earendildev / slack.sh
Last active Aug 18, 2022 — forked from andkirby/slack.sh
Shell/Bash script for sending slack messages.
View slack.sh
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation - LINUX
# $ curl -s https://gist.githubusercontent.com/earendildev/b08f5923885ae665fe35715827a1c332/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# Installation - MAC
# $ curl -s https://gist.githubusercontent.com/earendildev/b08f5923885ae665fe35715827a1c332/raw --output /usr/local/bin/slack
View kill-adobe-cc.sh
#!/bin/bash
ps axuwww | grep Adobe --exclude='grep' | awk '{print $2}' | xargs sudo kill -9
ps axuwww | grep 'com.adobe.acc.installer.v2' --exclude='grep' | awk '{print $2}' | xargs sudo kill -9
echo "\n\n--- Done! ---\n\n"