Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | ๐ :tada: |
Version tag | ๐ :bookmark: |
New feature | โจ :sparkles: |
Bugfix | ๐ :bug: |
--[[ json.lua | |
A compact pure-Lua JSON library. | |
The main functions are: json.stringify, json.parse. | |
## json.stringify: | |
This expects the following to be true of any tables being encoded: | |
* They only have string or number keys. Number keys must be represented as | |
strings in json; this is part of the json spec. |
#!/bin/bash | |
# Nuke it, baby | |
# | |
if [[ "$(hostname)" = 'metis' ]] | |
then | |
echo | |
echo -e "\033[36m""This is the metis slot, i am exiting""\e[0m" | |
echo | |
exit |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | ๐ :tada: |
Version tag | ๐ :bookmark: |
New feature | โจ :sparkles: |
Bugfix | ๐ :bug: |
# Set the prompt to include the IP address instead of hostname | |
function get_ip () { | |
IFACE=$(ip -4 route | grep default | head -n1 | awk '{print $5}') | |
if [ ! -z $IFACE ]; then | |
echo -n "|"; ip -4 -o addr show scope global $IFACE | awk '{gsub(/\/.*/, "|",$4); print $4}' | paste -s -d "" | |
else | |
echo -n "||" | |
fi | |
} |
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
--- | |
-- Function to retrieve console output | |
-- | |
function os.capture(cmd, raw) | |
local handle = assert(io.popen(cmd, 'r')) | |
local output = assert(handle:read('*a')) | |
handle:close() | |
if raw then |
This should make true-color and italics work in your tmux session.
Tested successfully in bash and zsh with latest packages from Arch (with exception of Neovim from Git) 20019-07-07.
&t_8f
and &t_8b
in your vim config$TERM
in your zshrc, bashrc, etc. Let your terminal set this. So far xterm-256color
has worked best for me.## Delete a remote branch | |
$ git push origin --delete <branch> # Git version 1.7.0 or newer | |
$ git push origin :<branch> # Git versions older than 1.7.0 | |
## Delete a local branch | |
$ git branch --delete <branch> | |
$ git branch -d <branch> # Shorter version | |
$ git branch -D <branch> # Force delete un-merged branches | |
## Delete a local remote-tracking branch |
#!/bin/sh | |
# | |
# Query a property from the terminal, e.g. background color. | |
# | |
# XTerm Operating System Commands | |
# "ESC ] Ps;Pt ST" | |
oldstty=$(stty -g) | |
# What to query? |