This is in particular aimed at using multiple versions of PostgreSQL at different ports.
export VERSION=15
port info postgresql${VERSION}-server
use indicatif::{ProgressBar, ProgressStyle}; | |
use std::fs::File; | |
use std::io; | |
const DOWNLOAD_TEMPLATE: &str = | |
"{msg} {spinner:.green} [{elapsed_precise}] [{wide_bar:.cyan/blue}] {bytes}/{total_bytes} ({eta})"; | |
pub fn download_file(url: &str) -> io::Result<()> { | |
let resp = ureq::get(&url).call().unwrap(); |
################################ | |
#### Gruvbox Material Light #### | |
################################ | |
set $bg #fbf1c7 | |
set $fg #654735 | |
set $red #c14a4a | |
set $orange #c35e0a | |
set $green #6c782e | |
set $blue #45707a | |
set $purple #945e80 |
#zenburn | |
set $bg #2c2c2e | |
set $fg #9f9f9f | |
set $hi #efef8f | |
set $ac #a0afa0 | |
set $tx #040404 | |
set $ia #8f8f8f | |
set $be #8faf9f | |
set $yw #ccdc90 | |
set $gn #88b090 |
macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.
Instead of tmux-256color
, use screen-256color
which comes with system. Place this command into ~/.tmux.conf
or ~/.config/tmux/tmux.conf
(for version 3.1 and later):
[0;37;40m | |
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;34;40m###[0;37;40m [1;37;40m##[0;37;40m | |
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m | |
[1;34;40m┌ #### [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;34;40m [0;37;40m [1;37;40m####[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m###[0;37;40m [1;34;40m##[0;37;40m [1;37;40m### ###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;31;40m ###[0;37;40m [1;31;40m###[0;37;40m | |
[1;34;40m│ [0;37;40m [1;34;40m## [0;37;40m [1;37;40m###[0;37;40m [1;37;40m##[1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;31;40m [1;37; |
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf | |
# Scroll History | |
set -g history-limit 50000 | |
# show messages for 4 seconds instead | |
set -g display-time 4000 | |
# set first window to index 1 (not 0) to map more to the keyboard layout | |
set-option -g renumber-windows on |
#include <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <cstdio> | |
#include <cassert> | |
using namespace std; | |
typedef double ElementType; | |
typedef vector<vector<ElementType>> matrix; |
# | |
# Tools -> Build System -> New Build System | |
# Paste the snippet below in the file that opens | |
# Save as "Maven.sublime-build" in ~/.config/sublime-text-3/Packages/User | |
# Ctrl+Shift+P will show all maven commands in snippet below if you start to type "Maven" | |
# Open a pom.xml file and execute a command | |
# | |
{ | |
"working_dir": "$file_path", | |
"shell_cmd":"mvn clean install", |
shopt -s checkwinsize 2>/dev/null | |
_cmd_status() { | |
if [ $? -eq 0 ]; then | |
printf '\001[0;32m\002✔' | |
else | |
printf '\001[0;31m\002✘' | |
fi | |
} |