This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pyinstaller --add-data=".env;." myscript.py | |
# This command tells PyInstaller to include the .env file in the distribution, and to place it in the same directory as the .exe file. | |
# Note that the --add-data option takes two arguments separated by a semicolon: the first argument is the path to the .env file, and the second argument is the destination directory for the file. In this case, the destination directory is the current directory, denoted by the . symbol. | |
# After running this command, PyInstaller will generate a new directory containing the .exe file and the .env file, as well as any other necessary files for your script to run. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Whenever you clone a repo, you do not clone all of its branches by default. | |
#If you wish to do so, use the following script: | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do | |
git branch --track ${branch#remotes/origin/} $branch | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Warsync - a tool for speeding up rsync of war files by unzipping them on the source and target and then rsyncing the diffs | |
echo "Usage: $0 source.war destinationserver" | |
CURRENTDIR=$PWD | |
WARFILE="$CURRENTDIR/$1" | |
REMOTEHOST=$2 | |
CURRENTUSER=$USER | |
REMOTEHOME="/home/$CURRENTUSER" | |
WARFILENAME=`basename $1` | |
echo "source is $WARFILE target is $TARGET" |