Various ffmpeg
commands:
- Audio rate: limit audio rate to 44100:
ffmpeg -i INPUT -ar 44100 OUTPUT
# drestore() | |
# | |
# Restore a drush database backup: | |
# | |
# drestore [backup] | |
function drestore() { | |
drush sql-drop --yes | |
pv $1 | drush sqlc | |
if [[ -e ./core ]]; then | |
drush cache-rebuild |
#!/usr/bin/env python | |
import csv | |
with open('example.csv', 'rb') as original_file: | |
data = csv.reader(original_file) | |
for row in data: | |
for item in row: | |
print "%s" % item | |
break |
#!/bin/bash | |
# | |
# Usage: ./commit_everything.sh "Commit message" | |
BOLD=$(tput bold) | |
BLACK=$(tput setaf 0) | |
WHITE=$(tput setaf 7) | |
BLUE=$(tput setaf 4) | |
GREEN=$(tput setaf 2) | |
NORMAL=$(tput sgr0) |
#!/usr/bin/env python | |
import itertools | |
import argparse | |
import sys | |
import time | |
def get_permutations(number, delimiter=''): | |
for seq in itertools.product((0,1), repeat=number): | |
yield delimiter.join(map(str, seq)) |
# Stops iTunes and ejects an external drive | |
set appname to "iTunes" | |
set volumename to "Example" | |
tell application appname to quit | |
repeat until application appname is not running | |
delay 1 | |
end repeat |
#!/bin/bash | |
# | |
# Usage: ./commit_everything.sh "Commit message" | |
# | |
# This script will commit everything! This means that it will commit changes | |
# in submodules, subprojects, and the parent repo (if there is one). This came | |
# about after working on several projects with varying git repo setups and | |
# provides a single interface for all kinds of committing! | |
# | |
# The commit message provided is used on all commits except those commits |
#!/usr/bin/env python | |
""" | |
workTime.py | |
Coded by: Rob Ballou ([email protected]) | |
Calculates the number of hours that have passed | |
in a work day (starting at 8:30). | |
The start time can be changed by passing the hour and min |
Various ffmpeg
commands:
ffmpeg -i INPUT -ar 44100 OUTPUT
#!/bin/bash | |
# | |
# Change git branches in all subfolders (that are git repos) | |
# | |
# Usage: ./resources/scripts/branch.sh BRANCH | |
# | |
set -e |
#!/bin/bash | |
# check number of arguments, output a message to STDERR | |
if [[ "$#" -eq "0" ]]; then | |
2>&1 echo "Usage: $0 FILE" | |
exit 1 | |
fi | |
# check if an argument equals a string | |
if [[ "$1" = "dev" ]]; then |