summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rw-r--r--.local/bin/.DS_Storebin0 -> 6148 bytes
-rwxr-xr-x.local/bin/9t6
-rwxr-xr-x.local/bin/Turtle3
-rwxr-xr-x.local/bin/Turtle.jarbin0 -> 36074 bytes
-rwxr-xr-x.local/bin/a6
-rwxr-xr-x.local/bin/appify15
-rwxr-xr-x.local/bin/b22
-rwxr-xr-x.local/bin/cfetch3
-rw-r--r--.local/bin/cfetch.jarbin0 -> 62049 bytes
-rwxr-xr-x.local/bin/connect3
-rwxr-xr-x.local/bin/dotfiles-config97
-rwxr-xr-x.local/bin/ipfetch3
-rw-r--r--.local/bin/jar.tarbin0 -> 172544 bytes
-rwxr-xr-x.local/bin/jed3
-rw-r--r--.local/bin/jed.jarbin0 -> 4498 bytes
-rwxr-xr-x.local/bin/macname8
-rwxr-xr-x.local/bin/mr3
-rwxr-xr-x.local/bin/tchan3
-rw-r--r--.local/bin/terminalChan.jarbin0 -> 63645 bytes
-rwxr-xr-x.local/bin/testPort6
-rwxr-xr-x.local/bin/theme14
-rwxr-xr-x.local/bin/unix26
22 files changed, 221 insertions, 0 deletions
diff --git a/.local/bin/.DS_Store b/.local/bin/.DS_Store
new file mode 100644
index 0000000..f2f4c44
--- /dev/null
+++ b/.local/bin/.DS_Store
Binary files differ
diff --git a/.local/bin/9t b/.local/bin/9t
new file mode 100755
index 0000000..865b4a5
--- /dev/null
+++ b/.local/bin/9t
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+SHELL=$PLAN9/bin/rc
+font=/mnt/font/Menlo-Regular/15a/font
+fontsrv &
+9 9term -f $font
diff --git a/.local/bin/Turtle b/.local/bin/Turtle
new file mode 100755
index 0000000..b4e0857
--- /dev/null
+++ b/.local/bin/Turtle
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -jar $HOME/.local/bin/Turtle.jar
diff --git a/.local/bin/Turtle.jar b/.local/bin/Turtle.jar
new file mode 100755
index 0000000..a10339d
--- /dev/null
+++ b/.local/bin/Turtle.jar
Binary files differ
diff --git a/.local/bin/a b/.local/bin/a
new file mode 100755
index 0000000..df306a4
--- /dev/null
+++ b/.local/bin/a
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+SHELL=$PLAN9/bin/rc
+font=/mnt/font/Menlo-Regular/15a/font
+9 fontsrv &
+9 acme -a -f $font $@ \ No newline at end of file
diff --git a/.local/bin/appify b/.local/bin/appify
new file mode 100755
index 0000000..90fa765
--- /dev/null
+++ b/.local/bin/appify
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+APPNAME=${2:-$(basename "${1}" '.sh')};
+DIR="${APPNAME}.app/Contents/MacOS";
+
+if [ -a "${APPNAME}.app" ]; then
+ echo "${PWD}/${APPNAME}.app already exists :(";
+ exit 1;
+fi;
+
+mkdir -p "${DIR}";
+cp "${1}" "${DIR}/${APPNAME}";
+chmod +x "${DIR}/${APPNAME}";
+
+echo "${PWD}/$APPNAME.app";
diff --git a/.local/bin/b b/.local/bin/b
new file mode 100755
index 0000000..596b320
--- /dev/null
+++ b/.local/bin/b
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+# Select `b` (or before it, or after) and assign Acme `addr` to selection
+echo addr=dot | 9p write acme/$winid/ctl
+
+# Mark the current line and change `addr` to it
+echo -n '__MARKER__' | 9p write acme/$winid/data
+echo -n '/^.*__MARKER__/' | 9p write acme/$winid/addr
+
+# Process the line
+line=$(9p read acme/$winid/data | sed 1q)
+indentation=$(echo "$line" | sed -E 's/^( *).*$/\1/')
+before_marker=$(echo "$line" | sed -E 's/b?__MARKER__.*$/{/')
+after_marker=$(echo "$line" | awk -F'__MARKER__' '{print $2}')
+[ "$after_marker" == "b" ] && after_marker=""
+
+# Compose the final block
+block="$before_marker"$'\n'"$indentation "$'\n'"$indentation}$after_marker"
+
+# Change `addr` one more time and replace original line with my block
+echo -n '/^.*__MARKER__.*\n?/' | 9p write acme/$winid/addr
+echo "$block" | 9p write acme/$winid/data \ No newline at end of file
diff --git a/.local/bin/cfetch b/.local/bin/cfetch
new file mode 100755
index 0000000..5e9b43b
--- /dev/null
+++ b/.local/bin/cfetch
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -jar $HOME/.local/bin/cfetch.jar $@
diff --git a/.local/bin/cfetch.jar b/.local/bin/cfetch.jar
new file mode 100644
index 0000000..d4e4063
--- /dev/null
+++ b/.local/bin/cfetch.jar
Binary files differ
diff --git a/.local/bin/connect b/.local/bin/connect
new file mode 100755
index 0000000..abfcaf1
--- /dev/null
+++ b/.local/bin/connect
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ssh -Y jmm@jacobmcdonnell.com
diff --git a/.local/bin/dotfiles-config b/.local/bin/dotfiles-config
new file mode 100755
index 0000000..e2a4296
--- /dev/null
+++ b/.local/bin/dotfiles-config
@@ -0,0 +1,97 @@
+#!/bin/sh
+DOTFILESDIR=$HOME/Documents/projects/gitlab/dotfiles
+add(){
+ cd $HOME
+ declare -i count=1
+ declare -i countForDia=1
+ while [ "$count" -le "$(ls -A $HOME | wc -w)" ]
+ do
+ name[$countForDia]="$(ls -A $HOME | sed "${count}q;d")"
+ forDialog[$countForDia]="${countForDia} $(ls -A $HOME | sed "${count}q;d") off "
+ count=$((count+1))
+ countForDia=$((countForDia+1))
+ done
+ count=1
+ while [ "$count" -le "$(ls -A $HOME/.config/ | wc -w)" ]
+ do
+ name[$countForDia]=".config/$(ls -A $HOME/.config/ | sed "${count}q;d")"
+ forDialog[$countForDia]="${countForDia} .config/$(ls -A $HOME/.config/ | sed "${count}q;d") off "
+ countForDia=$((countForDia+1))
+ count=$((count+1))
+ done
+ count=1
+ while [ "$count" -le "$(ls -A $HOME/.local/share/ | wc -w)" ]
+ do
+ name[$countForDia]=".local/share/$(ls -A $HOME/.local/share/ | sed "${count}q;d")"
+ forDialog[$countForDia]="${countForDia} .local/share/$(ls -A $HOME/.local/share/ | sed "s/Paradox Interactive/ParadoxInteractive/g" | sed "${count}q;d") off "
+ countForDia=$((countForDia+1))
+ count=$((count+1))
+ done
+ name[$countForDia]=".local/bin/"
+ forDialog[$countForDia]="${countForDia} .local/bin/ off"
+ set -A files $(dialog --title "Dotfiles in the Home directory" --checklist "Select dotfiles:" 0 0 0 ${forDialog[*]} 3>&1 1>&2 2>&3 3>&-)
+ cd $DOTFILESDIR
+ count=0
+ while [ "$count" -le "${#files[@]}" ]
+ do
+ [ -f ${name[${files[$count]}]} ] && cp $HOME/${name[${files[$count]}]} ${name[${files[$count]}]}
+ [ -d ${name[${files[$count]}]} ] && cp -TR $HOME/${name[${files[$count]}]} ${name[${files[$count]}]}
+ git add ${name[${files[$count]}]}
+ count=$((count+1))
+ done
+ COMMITMSG=$(dialog --title "Commit Message" --inputbox "Message" 0 0 3>&1 1>&2 2>&3 3>&-)
+ git commit -m "$COMMITMSG"
+ git push
+}
+del(){
+ cd $DOTFILESDIR
+ declare -i count=1
+ declare -i countForDia=1
+ while [ "$count" -le "$(ls -A $DOTFILESDIR | wc -w)" ]
+ do
+ name[$countForDia]="$(ls -A $DOTFILESDIR | sed "${count}q;d")"
+ forDialog[$countForDia]="${countForDia} $(ls -A $DOTFILESDIR | sed "${count}q;d") off "
+ count=$((count+1))
+ countForDia=$((countForDia+1))
+ done
+ count=1
+ while [ "$count" -le "$(ls -A $DOTFILESDIR/.config/ | wc -w)" ]
+ do
+ name[$countForDia]=".config/$(ls -A $DOTFILESDIR/.config/ | sed "${count}q;d")"
+ forDialog[$countForDia]="${countForDia} .config/$(ls -A $DOTFILESDIR/.config/ | sed "${count}q;d") off "
+ countForDia=$((countForDia+1))
+ count=$((count+1))
+ done
+ count=1
+ while [ "$count" -le "$(ls -A $DOTFILESDIR/.local/share/ | wc -w)" ]
+ do
+ name[$countForDia]=".local/share/$(ls -A $DOTFILESDIR/.local/share/ | sed "${count}q;d")"
+ forDialog[$countForDia]="${countForDia} .local/share/$(ls -A $DOTFILESDIR/.local/share/ | sed "${count}q;d") off "
+ countForDia=$((countForDia+1))
+ count=$((count+1))
+ done
+ count=1
+ while [ "$count" -le "$(ls -A $DOTFILESDIR/.local/bin/ | wc -w)" ]
+ do
+ name[$countForDia]=".local/bin/$(ls -A $DOTFILESDIR/.local/bin/ | sed "${count}q;d")"
+ forDialog[$countForDia]="${countForDia} .local/bin/$(ls -A $DOTFILESDIR/.local/bin/ | sed "${count}q;d") off "
+ countForDia=$((countForDia+1))
+ count=$((count+1))
+ done
+ set -A files $(dialog --title "Dotfiles in the Dotfiles directory" --checklist "Select dotfiles:" 0 0 0 ${forDialog[*]} 3>&1 1>&2 2>&3 3>&-)
+ count=0
+ while [ "$count" -le "${#files[@]}" ]
+ do
+ git rm -r ${name[${files[$count]}]}
+ echo ${name[${files[$count]}]}
+ count=$((count+1))
+ done
+ COMMITMSG=$(dialog --title "Commit Message" --inputbox "Message" 0 0 3>&1 1>&2 2>&3 3>&-)
+ git commit -m "$COMMITMSG"
+ git push
+}
+mainMenu(){
+ select=$(dialog --title "Dotfiles Script" --menu "Select an option:" 0 0 0 1 Add 2 Delete 3>&1 1>&2 2>&3 3>&-)
+ ( [ $select = 1 ] && add ) || ( [ $select = 2 ] && del )
+}
+mainMenu
diff --git a/.local/bin/ipfetch b/.local/bin/ipfetch
new file mode 100755
index 0000000..05befda
--- /dev/null
+++ b/.local/bin/ipfetch
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+curl https://icanhazip.com
diff --git a/.local/bin/jar.tar b/.local/bin/jar.tar
new file mode 100644
index 0000000..b4df345
--- /dev/null
+++ b/.local/bin/jar.tar
Binary files differ
diff --git a/.local/bin/jed b/.local/bin/jed
new file mode 100755
index 0000000..bb39377
--- /dev/null
+++ b/.local/bin/jed
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -jar /Users/jmm/.local/bin/jed.jar $@
diff --git a/.local/bin/jed.jar b/.local/bin/jed.jar
new file mode 100644
index 0000000..ae90296
--- /dev/null
+++ b/.local/bin/jed.jar
Binary files differ
diff --git a/.local/bin/macname b/.local/bin/macname
new file mode 100755
index 0000000..cc7fcc9
--- /dev/null
+++ b/.local/bin/macname
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+name=$1
+
+sudo scutil --set ComputerName $name &&
+sudo scutil --set HostName $name &&
+sudo scutil --set LocalHostName $name &&
+echo Done
diff --git a/.local/bin/mr b/.local/bin/mr
new file mode 100755
index 0000000..b3d7c48
--- /dev/null
+++ b/.local/bin/mr
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make run \ No newline at end of file
diff --git a/.local/bin/tchan b/.local/bin/tchan
new file mode 100755
index 0000000..a9b62d9
--- /dev/null
+++ b/.local/bin/tchan
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -jar $HOME/.local/bin/terminalChan.jar $@
diff --git a/.local/bin/terminalChan.jar b/.local/bin/terminalChan.jar
new file mode 100644
index 0000000..23b9cc5
--- /dev/null
+++ b/.local/bin/terminalChan.jar
Binary files differ
diff --git a/.local/bin/testPort b/.local/bin/testPort
new file mode 100755
index 0000000..92e76d4
--- /dev/null
+++ b/.local/bin/testPort
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+nc -vz $1 25565 ;
+ nc -vz $1 80 ;
+ nc -vz $1 443 ;
+nc -vz $1 22
diff --git a/.local/bin/theme b/.local/bin/theme
new file mode 100755
index 0000000..c6f0c2c
--- /dev/null
+++ b/.local/bin/theme
@@ -0,0 +1,14 @@
+#!/bin/zsh
+# Switch to Solarized Dark if we are currently in dark mode
+if [[ "$(uname -s)" == "Darwin" ]]; then
+ val=$(defaults read -g AppleInterfaceStyle 2>/dev/null)
+ if [[ $val == "Dark" ]]; then
+ osascript -e 'tell application "Terminal"
+ set current settings of tabs of windows to settings set "PaperColor-dark" # Theme name
+ end tell'
+ else
+ osascript -e 'tell application "Terminal"
+ set current settings of tabs of windows to settings set "PaperColor-light" # Theme name
+ end tell'
+ fi
+fi
diff --git a/.local/bin/unix b/.local/bin/unix
new file mode 100755
index 0000000..a9fb96e
--- /dev/null
+++ b/.local/bin/unix
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+#original artwork by http://www.sanderfocus.nl/#/portfolio/tech-heroes
+#converted to shell by #nixers @ irc.unix.chat
+
+cat << 'eof'
+ ,_ ,_==▄▂
+ , ▂▃▄▄▅▅▅▂▅¾. / /
+ ▄▆<´ "»▓▓▓%\ / / / /
+ ,▅7" ´>▓▓▓% / / > / >/%
+ ▐¶▓ ,»▓▓¾´ /> %/%// / /
+ ▓▃▅▅▅▃,,▄▅▅▅Æ\// ///>// />/ /
+ V║«¼.;→ ║<«.,`=// />//%/% / /
+ //╠<´ -²,)(▓~"-╝/¾/ %/>/ />
+ / / / ▐% -./▄▃▄▅▐, /7//;//% / /
+ / ////`▌▐ %zWv xX▓▇▌//&;% / /
+ / / / %//%/¾½´▌▃▄▄▄▄▃▃▐¶\/& /
+ </ /</%//`▓!%▓%╣[38;5;255;╣WY<Y)y&/`\
+ / / %/%//</%//\i7; ╠N>)VY>7; \_ UNIX IS VERY SIMPLE IT JUST NEEDS A
+ / /</ //<///<_/%\▓ V%W%£)XY _/%‾\_, GENIUS TO UNDERSTAND ITS SIMPLICITY
+ / / //%/_,=--^/%/%%\¾%¶%%} /%%%%%%;\,
+ %/< /_/ %%%%%;X%%\%%;, _/%%%;, \
+ / / %%%%%%;, \%%l%%;// _/%;, dmr
+ / %%%;, <;\-=-/ /
+ ;, l
+eof