mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 11:04:41 +02:00
initial commit
This commit is contained in:
commit
86a1da2632
35 changed files with 1162 additions and 0 deletions
21
bin/host-is-on.sh
Executable file
21
bin/host-is-on.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "No host given!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# repeat a notification if the host is not online after this amount of seconds yet
|
||||
waiting=30
|
||||
|
||||
count=0
|
||||
while ! ping -W 1 -w 1 -c 1 $1 2>&1 >/dev/null; do
|
||||
sleep 1
|
||||
count=$(( $count + 1))
|
||||
if [ $count -gt $waiting ]; then
|
||||
count=0
|
||||
notify-send -i network-transmit "Host wait" "Still waiting for host '$1'."
|
||||
fi
|
||||
done
|
||||
|
||||
notify-send -i network-transmit-receive "Host online!" "Host '$1' is now online!!!"
|
9
bin/mdo.sh
Executable file
9
bin/mdo.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# open a Markdown document in your browser directly
|
||||
# mdo => markdown open
|
||||
|
||||
# e.g. preview the markdown in vim:
|
||||
# :!mdo %
|
||||
|
||||
$BROWSER "data:text/html;base64,`markdown $* | base64 -w 0`"
|
Loading…
Add table
Add a link
Reference in a new issue