Example output
$ ./undefined_vs_empty.bash
x was not set.
$ ./undefined_vs_empty.bash -x ''
x was set to: ''
$ ./undefined_vs_empty.bash -x hello
x was set to: 'hello'
# terminal coloring | |
export CLICOLOR=1 | |
export LSCOLORS=dxFxCxDxBxegedabagacad | |
local git_branch='$(git_prompt_info)%{$reset_color%}' | |
PROMPT="┌─[%B%{$fg[green]%}%n%{$reset_color%}%b][%{$fg[green]%}%m%{$reset_color%}]${git_branch}[%{$fg[cyan]%}%~%{$reset_color%}] | |
└─▪ " | |
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg[green]%}%B±%b%{$reset_color%}][" |
Example output
$ ./undefined_vs_empty.bash
x was not set.
$ ./undefined_vs_empty.bash -x ''
x was set to: ''
$ ./undefined_vs_empty.bash -x hello
x was set to: 'hello'
### ~/.subversion/config | |
### Add this line to the [helpers] section | |
diff-cmd = ~/bin/svn-diffwrap.sh |
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I 'networkname' -x
# start up with 'docker-compose up -d' to start in background | |
# update images with 'docker-compose pull' | |
# this assumes that you have a sibling directory to this file called 'config' that contains all of the config for these services | |
# you can reference 'sabnzbd' 'radarr' or 'sonarr' from inside the containers (in the apps) to reference the other containers. no need to deal with IPs or hostnames | |
# remember that docker is isolated from the rest of your filesystem. you need to add volumes to the entries | |
# in order to give the processes access to them. so if you have multiple target directories for TV or Movies, | |
# then make sure you add each one that you want radarr/sonarr/sabnzbd to see. | |
version: '3' | |
services: |
fn sum(x: Vec<u32>) -> u32 { | |
x.iter().fold(0, |acc, i| acc + i) | |
} | |
fn main() { | |
let my_vec: Vec<u32> = vec![ 1, 2, 3 ]; | |
println!("sum: {}", sum(my_vec)); | |
} |
#! /usr/bin/env bash | |
notify::send() { | |
local msg="$1" | |
local email | |
email="$( email_join "${email_list[@]}" )" | |
curl -v \ | |
-XPOST \ |
Big Lebowski | |
Gramma's Boy | |
Princess Bride | |
Fifth Element | |
Superbad | |
Raiders of the Lost Ark | |
Back to the Future | |
Mad Max: Fury Road | |
Akira | |
The Matrix |
I hereby claim:
To claim this, I am signing this object:
#! /bin/bash - | |
run_loop() { | |
local list=() | |
for item in $( seq 5 10 ); do | |
list+=("$item") | |
done | |
echo "List has ${#list[@]} items" | |
} |