about summary refs log tree commit diff
path: root/functions/misc_functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/misc_functions.sh')
-rw-r--r--functions/misc_functions.sh39
1 files changed, 33 insertions, 6 deletions
diff --git a/functions/misc_functions.sh b/functions/misc_functions.sh
index 31b421065a48..a943573e5fd5 100644
--- a/functions/misc_functions.sh
+++ b/functions/misc_functions.sh
@@ -1,9 +1,3 @@
-# fuzzily-find-file
-function wgff {
-  echo $(find . -type f | fzf-tmux)
-}
-
-
 # fuzzily-find-branch
 function wgfb {
   echo $(git branch -a | fzf-tmux)
@@ -79,3 +73,36 @@ function tt() {
   fi
 }
 
+
+# generates placeholder content for FE work
+function lorem {
+    text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+
+    echo $text
+}
+
+
+# generates lorem and adds to pasteboard
+function loremcp {
+    lorem | pbcopy
+}
+
+
+# searches all PATH directories for a keyword
+function wsearchpath {
+  echo $PATH | tr ':' '\n' | xargs -I {} find {} -type f -perm +111 -maxdepth 1 -name "*${1}*" -print | xargs basename
+}
+
+
+# tests an internet connection
+function is_online {
+  wget -q --spider "http://google.com"
+
+  if [ $? -eq 0 ]; then
+    echo "Online"
+    return 0
+  else
+    echo "Offline"
+    return 1
+  fi
+}