Browse Source

Merge pull request #10 from fundatillus/master

A couple scripts for your consideration.
pull/17/head
Jeffery Russell 5 years ago
committed by GitHub
parent
commit
f2c96e7a77
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 0 deletions
  1. +10
    -0
      scripts/iPhoneVideoRotate.sh
  2. +43
    -0
      virtualenv-auto-activate.sh

+ 10
- 0
scripts/iPhoneVideoRotate.sh View File

@ -0,0 +1,10 @@
#!/bin/sh
# This script rotates video files that were created on an iPhone,
# but being edited on Linux. Requires the CLI version of HandBrake.
# This script takes two arguments:
# First argument is the input file
# Second argument is the output file
HandBrakeCLI --rotate=4 --preset "High Profile" -O -i $1 -o $2

+ 43
- 0
virtualenv-auto-activate.sh View File

@ -0,0 +1,43 @@
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
# For example:
# .
# ├── .git
# │ ├── HEAD
# │ ├── config
# │ ├── description
# │ ├── hooks
# │ ├── info
# │ ├── objects
# │ └── refs
# └── .venv
# ├── bin
# ├── include
# └── lib
#
# The virtualenv will be activated automatically when you enter the directory.
_virtualenv_auto_activate() {
if [ -e ".venv" ]; then
# Check to see if already activated to avoid redundant activating
if [ "$VIRTUAL_ENV" != "$(pwd -P)/.venv" ]; then
_VENV_NAME=$(basename `pwd`)
echo Activating virtualenv \"$_VENV_NAME\"...
VIRTUAL_ENV_DISABLE_PROMPT=1
source .venv/bin/activate
_OLD_VIRTUAL_PS1="$PS1"
PS1="($_VENV_NAME)$PS1"
export PS1
fi
fi
}
export PROMPT_COMMAND=_virtualenv_auto_activate

Loading…
Cancel
Save