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
#! /usr/bin/env python | |
def move_gopro_in_file(filename): | |
file = open(filename) | |
lines = file.readlines() | |
file.close() | |
gopro = lines[-3] | |
from string import whitespace |
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
#! /usr/bin/env bash | |
# hashapass.com method for generating passwords | |
# based on the script by Simon Elmir at http://hashapass.com/en/cmd.html | |
export IFS="" #read will now preserve whitespace | |
read -rp "parameter: " PARAMETER | |
read -rsp "password: " PASSWORD | |
echo | |
read -n 2 -rp "how many characters: " LENGTH |
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
#! /usr/bin/env bash | |
function print_usage() { | |
echo | |
echo "$0 <file_to_validate> [<file_with_hash_of_file>] [-p]" | |
echo "If no hash file is passed, the script will assume it is <filename>.md5" | |
echo "The -p flag will print out whether the file hash matches the hash provided" | |
echo "Exits 0 if the computed hash matches the provided hash and 1 otherwise" | |
echo | |
} |
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
colorscheme slate | |
syntax on "syntax highlighting | |
set number "line numbers | |
set expandtab "use spaces for tab | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 |
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
#!/usr/bin/env sh | |
from_branch=$1 | |
checked_out_branch=$2 | |
check_out_type=$3 # changing branches = 1; checking out a file = 0 | |
# If checking out a fresh clone | |
if test $from_branch = 0000000000000000000000000000000000000000 ; then | |
from_branch=`git hash-object -t tree /dev/null` # a hash representing an empty tree/repo | |
fi |
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
#!/usr/bin/env python | |
ALEFPOINT = 0x05D0 | |
TAFPOINT = 0x05EA | |
VALUES = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 20, 30, 40, 40, 50, 50, 60, 70, 80, 80, 90, 90, 100, 200, 300, 400] | |
FINALS = [u'\u05DA', u'\u05DD', u'\u05DF', u'\u05E3', u'\u05E5'] | |
alefbetrange = [unichr(a) for a in range(ALEFPOINT, TAFPOINT + 1)] | |
gematrimap = dict(zip(alefbetrange, VALUES)) | |
alefbet = ''.join([u for u in alefbetrange if u not in FINALS]) |
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
#!/usr/bin/env bash | |
archiveflag="--keep-archive" | |
deleteflag="--delete" | |
nullflag="-" | |
archivedirectory="${HOME}/Library/JenkinsArchives" | |
configdir="${archivedirectory}/configs" | |
archivename=jenkins.tar.gz |
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
#! /usr/bin/env bash | |
usage() { | |
echo Usage: | |
echo "$0 <info_plist_file> [<build_number_directory>] [-v]" | |
echo "If a build number directory is given, the saved number will be checked," | |
echo " and if it exists and is greater than the build number in the info plist," | |
echo " it will be incremented and saved back to the given build number directory." | |
echo "If it does not exist, or it is smaller than the info plist build number," | |
echo " the info plist number will be incremented and saved back." |
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
#! /usr/bin/env bash | |
POSTMAN_URL="https://dl.pstmn.io/download/latest/linux64" | |
DL_LOCATION="/tmp/postman" | |
UPDATE_NAME="update.tar.gz" | |
ORIG_NAME="Postman" | |
NEW_NAME="postman" | |
LINK_LOCATION="/opt/bin" | |
DL_ARCHIVE="${DL_LOCATION}/${UPDATE_NAME}" |
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
#! /usr/bin/env bash | |
# if there are no arguments, or if the first argument is -h or --help | |
if test ${1:--h} = -h -o ${1:--h} = --help; then | |
echo "Usage: ${0} <buildtype> <src lib root> <destination lib dir> [<libnames>...]" | |
echo "<buildtype> is eg debug or release" | |
echo "<src lib root> is the directory containing the repos where libraries are to be found" | |
echo "<destination lib dir> is the directory within the repo to which files should be copied" | |
echo "<libnames> are the names of all libraries that should be copied (eg 'libcore')" | |
echo "if no libraries are specified, the libraries already found in the destination will be copied again." |
OlderNewer