This file contains hidden or 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/sh | |
curl -s -L -G "$1" > tmp | |
url=`grep -o 'https:\/\/pbs\.twimg\.com\/tweet_video\/.*\.mp4' tmp` | |
echo $url | |
curl -s -G $url > $2.mp4 | |
palette="palette.png" | |
filters="fps=10,scale=320:-1:flags=lanczos" |
This file contains hidden or 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
# Changes zsh globbing patterns | |
unsetopt NO_MATCH >/dev/null 2>&1 || : | |
# Dispatches calls of commands and arguments | |
dispatch () | |
{ | |
namespace="$1" # Namespace to be dispatched | |
arg="${2:-}" # First argument | |
short="${arg#*-}" # First argument without trailing - | |
long="${short#*-}" # First argument without trailing -- |
This file contains hidden or 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 | |
# --------------------------------------------------------------------------- | |
# new_script - Bash shell script template generator | |
# Copyright 2012, William Shotts <[email protected]> | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
This file contains hidden or 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 | |
# This script is based on https://gist.github.com/rehos/7856163 | |
if [ -z "$1" ]; then | |
echo | |
echo "usage: $0 <project.xcodeproj> [<scheme>]" | |
echo | |
exit | |
fi |
This file contains hidden or 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 | |
# This script is based on https://gist.github.com/rehos/7856163 | |
if [ -z "$1" ]; then | |
echo | |
echo "usage: $0 <project.xcodeproj> [<scheme>]" | |
echo | |
exit | |
fi |
This file contains hidden or 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/sh | |
# Require mediainfo: brew install mediainfo | |
function readSong () { | |
if [ "$1" != "." ] ; then | |
TITLE=`mediainfo "$1" | grep "^\Track name\ *:" | sed 's/.*Track name\ *:\ //g'` | |
ARTIST=`mediainfo "$1" | grep "^\Performer\ *:" | sed 's/.*Performer\ *:\ //g'` | |
FILENAME=`mediainfo "$1" | grep "^\Complete name\ *:" | sed 's/.*Complete name\ *:\ //g' | sed 's/\.mp3$/\.txt/g' | sed 's/\.m4a$/\.txt/g'` | |
echo "Fetching lyric "$ARTIST" "$TITLE" ... " | |
LYRIC=`curl --data-urlencode "artist=$ARTIST" --data-urlencode "title=$TITLE" -G -s "http://makeitpersonal.co/lyrics"` |
This file contains hidden or 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/sh | |
function readImage () { | |
if [ "$1" != "." ] ; then | |
DIRTOMAKE=`identify -verbose "$1" | grep exif:DateTime: | sed 's/exif\:DateTime\: //g' | sed 's/\:[0-9][0-9] [0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]//g' | sed 's|:|/|g'` | |
trimmed=`echo "$DIRTOMAKE" | xargs` | |
if [ -z "$trimmed" ] ; then | |
trimmed="Unknown" | |
fi |
This file contains hidden or 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
// AppController.mm | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
[[CDAudioManager sharedManager] setMode:kAMM_FxPlusMusicIfNoOtherAudio]; | |
return YES; | |
} | |
// in other file |
This file contains hidden or 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
XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID` | |
for f in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*; do defaults write "$f/Contents/Info" DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID; done |
This file contains hidden or 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 | |
SCREEN=$(which screen) | |
if [ "$SCREEN" = "" ] | |
then | |
echo "Install screen then rerun" | |
exit 0 | |
fi | |
if [ "$STY" = "" ] |