mirror of
https://github.com/owenlejeune/zsh-plugins.git
synced 2025-11-19 13:50:54 -05:00
new custom plugins
This commit is contained in:
1
android/android.plugin.zsh
Normal file
1
android/android.plugin.zsh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
alias android-studio="open -a /Users/owenlejeune/Applications/JetBrains\ Toolbox/Android\ Studio.app"
|
||||||
3
apps/apps.plugin.zsh
Normal file
3
apps/apps.plugin.zsh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
VNC_VIEWER="VNC\ Viewer"
|
||||||
|
|
||||||
|
alias vnc_viewer="open -a $VNC_VIEWER"
|
||||||
@@ -1 +1,10 @@
|
|||||||
alias brewup="brew update && brew upgrade && brew cleanup && brew doctor && brew cask upgrade"
|
function brewup() {
|
||||||
|
echo "***BREW UPDATE***"
|
||||||
|
brew update
|
||||||
|
echo "***BREW UPGRADE***"
|
||||||
|
brew upgrade
|
||||||
|
echo "***BREW CLEANUP***"
|
||||||
|
brew cleanup
|
||||||
|
echo "***BREW DOCTOR***"
|
||||||
|
brew doctor
|
||||||
|
}
|
||||||
|
|||||||
10
scripts/frand.py
Normal file
10
scripts/frand.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import os, os.path
|
||||||
|
import sys
|
||||||
|
from random import randint
|
||||||
|
|
||||||
|
dirn = sys.argv[1]
|
||||||
|
dirlist = os.listdir(dirn)
|
||||||
|
numitems = len(dirlist)
|
||||||
|
i = randint(0,numitems-1)
|
||||||
|
print(dirlist[i])
|
||||||
|
|
||||||
24
scripts/randomnums.py
Normal file
24
scripts/randomnums.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
from random import randrange
|
||||||
|
import sys
|
||||||
|
|
||||||
|
#num = int(input("Enter a number: "))
|
||||||
|
#num2 = int(input("How many numbers: "))
|
||||||
|
|
||||||
|
args = len(sys.argv)
|
||||||
|
if args<3 or args>4:
|
||||||
|
print("Invalid command\n usage: randnums <MIN> <MAX> [<NUM>]")
|
||||||
|
quit()
|
||||||
|
|
||||||
|
nmin = int(sys.argv[1])
|
||||||
|
nmax = int(sys.argv[2])
|
||||||
|
nnum = 1 if args==3 else int(sys.argv[3])
|
||||||
|
|
||||||
|
if nmin>=nmax:
|
||||||
|
print("Error: min must be less than max")
|
||||||
|
quit()
|
||||||
|
if nnum <= 0:
|
||||||
|
print("Error: num must be greater than 0")
|
||||||
|
quit()
|
||||||
|
|
||||||
|
for x in range(0, nnum):
|
||||||
|
print(randrange(nmin, nmax))
|
||||||
4
scripts/scripts.plugin.zsh
Normal file
4
scripts/scripts.plugin.zsh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
SDIR="~/.oh-my-zsh/custom/plugins/scripts"
|
||||||
|
|
||||||
|
alias frand="python3 ${SDIR}/frand.py"
|
||||||
|
alias randnums="python3 ${SDIR}/randomnums.py"
|
||||||
Reference in New Issue
Block a user