Skip to content

Instantly share code, notes, and snippets.

@earendildev
earendildev / alarm.sh
Created November 22, 2022 06:30 — forked from pplantinga/alarm.sh
Want to set an alarm via OS X terminal? It's easy, just use this!
#!/bin/bash
# Simple script for setting an alarm on Mac OS X
# Arguments are ./alarm.sh {hour} {minute}
until [ `date "+%H"` -eq $1 ] && [ `date "+%M"` -eq $2 ]; do
sleep 10
done
osascript -e 'set volume 7'
@earendildev
earendildev / Traefik - docker-compose.yml
Last active September 7, 2022 04:28 — forked from IosifZ/docker-compose.yml
Traefik - Portainer - etc. Require to create an environment file to store variables, esp for Ouroboros
# Follow
# https://geek-cookbook.funkypenguin.co.nz
# for an updated version
version: '3.7'
services:
traefik_v2.0:
image: 'traefik:2.2'
container_name: traefik_v2
hostname: traefik_v2
@earendildev
earendildev / update-repos.fish
Created August 25, 2022 04:03 — forked from phette23/update-repos.fish
Shell script to run `git pull` inside all subdirectories which are git repositories. I keep a number of projects in a folder & this helps me avoid manually updating each.
#!/usr/bin/env fish
# similar script in Fish
# still under construction, need to quiet `git status` more effectively
function update -d 'Update git repo'
git stash --quiet
git pull
git stash apply --quiet
end
@earendildev
earendildev / ASCII ColoR Codes
Created July 18, 2022 11:45 — forked from dominikwilkowski/README.md
ANSI codes for cli controled output
# 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 July 18, 2022 10:48 — forked from dtmilano/colors
Shows terminal 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 July 18, 2022 10:47 — forked from shawnbot/xterm-256color.md
Make OS X Terminal respect 256 colors in screen

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 / slack.sh
Last active August 23, 2022 06:48 — forked from andkirby/slack.sh
Shell/Bash script for sending slack messages.
#!/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
@earendildev
earendildev / kill-adobe-cc.sh
Last active October 27, 2020 06:35 — forked from lucianghinda/kill-adobe-creative-cloud.sh
Kill all Adobe Processes
#!/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"