sudo mkdir -p /usr/local/bin &>/dev/null ; sudo curl -fsSL -o /usr/local/bin/getframe "https://gist.githubusercontent.com/snown/a818afd18c9e2087731bdf7ce0a85195/raw/getframe.sh" && sudo chmod a+x /usr/local/bin/getframe
getframe install-folder-action
| - (void)addAnimation:(CAAnimation *)anim forKey:(NSString *)key { | |
| DDLogVerboseMethodCall(@" %@", [anim debugDescription]); | |
| CAAnimation *finalAnim = anim; | |
| if ([key isEqualToString:@"position"] && [anim isKindOfClass:[CABasicAnimation class]]) { | |
| CABasicAnimation *contentsRectAnim; | |
| CALayer *presentationLayer = [self presentationLayer]; | |
| if (presentationLayer) { | |
| contentsRectAnim = [anim copy]; | |
| contentsRectAnim.keyPath = @"contentsRect"; |
| extension Array { | |
| mutating func prepend(newitem: T) { | |
| insert(newitem, atIndex: 0) | |
| } | |
| mutating func prepend(itemArray: Array) { | |
| for (index, item) in enumerate(itemArray) { | |
| insert(item, atIndex: index) | |
| } | |
| } | |
| } |
| #!/usr/bin/env bash | |
| VERSION=0.1.0 | |
| USAGE="$(basename "$0") [--ios|--mac] [-f ./file.playground] [Files...] | |
| where: | |
| -h Show this help text | |
| --ios Tells the command to turn the playground into a iOS compatible playground (default). | |
| --mac Tells the command to turn the playground into a iOS compatible playground. | |
| -f The path to a playground file (or you can leave out and all trailing arguments are parsed for playgrounds). |
| #!/usr/bin/env bash | |
| LAUNCH_LIST_PATH=/tmp/launchList | |
| touch $LAUNCH_LIST_PATH | |
| launchctl list > $LAUNCH_LIST_PATH | |
| sudo launchctl list >> $LAUNCH_LIST_PATH | |
| head -n 1 $LAUNCH_LIST_PATH | |
| grep "$@" $LAUNCH_LIST_PATH |
| // | |
| // UITextView+MTRXUILabel.h | |
| // Site Survey | |
| // | |
| // Created by Logan Holmes on 10/1/14. | |
| // Copyright (c) 2014 Logan Holmes. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> |
| <?php namespace App\Http\Controllers; | |
| use App\Facades\QueryCache; | |
| use App\Http\Requests; | |
| use App\Http\Controllers\Controller; | |
| use App\Models\Account; | |
| use DebugBar\DebugBar; | |
| use Illuminate\Database\Eloquent\Builder as EloquentQuery; |
| #!/usr/bin/env bash | |
| scriptSudo() { | |
| local SUDO_IS_ACTIVE | |
| SUDO_IS_ACTIVE=$(sudo -n uptime 2>&1|grep "load"|wc -l) | |
| if [[ ${SUDO_IS_ACTIVE} -le 0 ]]; then | |
| # Ask for the administrator password upfront | |
| sudo -v | |
| # Keep-alive: update existing `sudo` time stamp until `.osx` has finished |
| #!/usr/bin/env bash | |
| # Only supports one die, and the most basic notation right now | |
| # would like to complete support for dice notation as specified here: | |
| # https://en.wikipedia.org/wiki/Dice_notation | |
| _basename() { #portable basename | |
| [ -z "${1}" ] && return 1 || _basename__name="${1%%/}" | |
| [ -z "${2}" ] || _basename__suffix="${2}" | |
| case "${_basename__name}" in | |
| /*|*/*) _basename__name="$(expr "${_basename__name}" : '.*/\([^/]*\)')" ;; |
| function uniqueElements { | |
| local input_array=( "$@" ) | |
| local IFS=$'\n' | |
| local RESULT=( $(printf '%s\n' ${input_array[@]} | awk '!seen[$0]++') ) | |
| # Uncomment if you want the result to come back in a format that can easily be passed to `declare -a` | |
| #echo $(declare -p RESULT | sed "s/^[^(]*// ; s/'$//") | |
| echo "${RESULT[@]}" | |
| } |