Compare commits
2 Commits
e27931e626
...
7699de1ec9
Author | SHA1 | Date |
---|---|---|
Sage Vaillancourt | 7699de1ec9 | |
Sage Vaillancourt | 16b704d1be |
|
@ -10,6 +10,43 @@ fi
|
||||||
|
|
||||||
alias _slides="$(which slides 2> /dev/null || echo "echo 'slides not installed'")"
|
alias _slides="$(which slides 2> /dev/null || echo "echo 'slides not installed'")"
|
||||||
|
|
||||||
|
function roll {
|
||||||
|
local count=1
|
||||||
|
if [[ "$2" != "" ]]; then
|
||||||
|
count="$2"
|
||||||
|
fi
|
||||||
|
local rolls="$(shuf -i 1-$1 -n $count)"
|
||||||
|
echo "$rolls" | toilet
|
||||||
|
for i in {1..$count}; do
|
||||||
|
setsid cvlc --play-and-exit $HOME/Videos/roll.mp3 &> /dev/null
|
||||||
|
sleep "0.0$(shuf -i 5-9 -n 1)"
|
||||||
|
done
|
||||||
|
if [[ "$count" != "1" ]]; then
|
||||||
|
echo "Total: $(echo "$rolls" | paste -s -d+ - | bc)" | toilet
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
alias d4='roll 4'
|
||||||
|
alias 4='roll 4'
|
||||||
|
|
||||||
|
alias d6='roll 6'
|
||||||
|
alias 6='roll 6'
|
||||||
|
|
||||||
|
alias d8='roll 8'
|
||||||
|
alias 8='roll 8'
|
||||||
|
|
||||||
|
alias d10='roll 10'
|
||||||
|
alias 10='roll 10'
|
||||||
|
|
||||||
|
alias d12='roll 12'
|
||||||
|
alias 12='roll 12'
|
||||||
|
|
||||||
|
alias d20='roll 20'
|
||||||
|
alias 20='roll 20'
|
||||||
|
|
||||||
|
alias dedup="awk '!seen_lines[$0]++'"
|
||||||
|
alias dedup-keep-last="tac | awk '!seen_lines[$0]++' | tac"
|
||||||
|
|
||||||
function helpdef {
|
function helpdef {
|
||||||
if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
|
if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
|
||||||
echo "$2"
|
echo "$2"
|
||||||
|
|
|
@ -39,6 +39,7 @@ int main(int argc, char* argv[])
|
||||||
);
|
);
|
||||||
|
|
||||||
person->greet();
|
person->greet();
|
||||||
|
|
||||||
// Not necessary with unique_ptr:
|
// Not necessary with unique_ptr:
|
||||||
// delete person;
|
// delete person;
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,22 @@
|
||||||
document.addEventListener('DOMContentLoaded', function initJs () {
|
document.addEventListener('DOMContentLoaded', function initJs () {
|
||||||
console.log('Hello, world!')
|
console.log('Hello, world!')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// skeleton-script.js
|
||||||
|
|
||||||
|
#!/usr/bin/env bun
|
||||||
|
|
||||||
|
// See: https://bun.sh/docs/runtime/shell
|
||||||
|
|
||||||
|
import { $ } from "bun";
|
||||||
|
|
||||||
|
const lines = $`ls`.lines()
|
||||||
|
|
||||||
|
for await (let line of lines) {
|
||||||
|
console.log(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
const lineArray = await Array.fromAsync(lines)
|
||||||
|
console.log(lineArray.filter(s => s.startsWith("D")))
|
||||||
|
|
|
@ -290,3 +290,10 @@ function load_nvm {
|
||||||
test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh && source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh && source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
test -f "$HOME/.asdf/asdf.sh" && . "$HOME/.asdf/asdf.sh"
|
test -f "$HOME/.asdf/asdf.sh" && . "$HOME/.asdf/asdf.sh"
|
||||||
test -f ~/.cargo/env && source ~/.cargo/env
|
test -f ~/.cargo/env && source ~/.cargo/env
|
||||||
|
|
||||||
|
# bun completions
|
||||||
|
[ -s "/home/sage/.bun/_bun" ] && source "/home/sage/.bun/_bun"
|
||||||
|
|
||||||
|
# bun
|
||||||
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
|
Loading…
Reference in New Issue