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
find . -name "*@2x.png" -exec convert "{}" -resize 50% "{}.bak" \; | |
find . -name "*@2x.png.bak" -exec rename 's|\@2x.png.bak|.png|' "{}" \; |
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
➜ bin git:(master) brew install xctool --verbose | |
==> Downloading https://github.com/facebook/xctool/archive/v0.1.14.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/xctool-0.1.14.tar.gz | |
==> Verifying xctool-0.1.14.tar.gz checksum | |
tar xf /Library/Caches/Homebrew/xctool-0.1.14.tar.gz | |
==> ./scripts/build.sh XT_INSTALL_ROOT=/usr/local/Cellar/xctool/0.1.14/libexec | |
User defaults from command line: | |
IDEBuildLocationStyle = Custom | |
IDECustomBuildIntermediatesPath = /private/tmp/xctool-NBtq/xctool-0.1.14/build/./Intermediates | |
IDECustomBuildLocationType = Absolute |
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
#import <Foundation/Foundation.h> | |
@interface Animal : NSObject | |
{ | |
// The instance variable 'name' that would normally be generated by @property, is not visible in subclasses. | |
// Thus, leaving the subclasses with no way to set the 'name'. | |
// Because of this, we have to declare the instance variable publicly as well. | |
NSString *_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
@interface KIDPictureMaskAnimator() | |
@property (nonatomic) id<UIViewControllerContextTransitioning> transitionContext; | |
@end | |
@implementation KIDPictureMaskAnimator | |
#pragma mark - UIViewControllerAnimatedTransitioning | |
- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext |
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
Install rbenv | |
1. First, install LinuxBrew (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-linuxbrew-on-a-linux-vps) | |
2. Then, install rbenv ($ brew install rbenv) | |
1. Don't use rbevn's directories. Do add the appropriate lines to .bash_profile | |
| export PATH="$HOME/.rbenv/bin:$PATH" | |
| if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
3. Then install ruby-build ($brew install ruby-build) | |
4. Install latest ruby (check with `$ rbenv install -l` and install with `$ rbenv install 2.1.2`) |
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
rsync -rzPK -e 'ssh -p 2222' --delete _site/ bruno@ipaddress:/destination/dir |
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
Process: Mac_Runner [84570] | |
Path: /Users/USER/Library/Application Support/Steam/*/nuclearthrone.app/Contents/MacOS/Mac_Runner | |
Identifier: com.vlambeer.nuclearthrone | |
Version: 1.0.3 (1.0.3) | |
Code Type: X86 (Native) | |
Parent Process: launchd [289] | |
Responsible: Mac_Runner [84570] | |
User ID: 501 | |
Date/Time: 2014-10-04 11:28:39.871 +0200 |
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
#!/bin/bash | |
# | |
# (Above line comes out when placing in Xcode scheme) | |
# | |
# Inspired by original script by incanus: | |
# https://gist.github.com/1186990 | |
# | |
# Rewritten by martijnthe: | |
# https://gist.github.com/1379127 | |
# |
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
ffmpeg -i iMovieLetterboxedPortrait.mp4 -filter:v "crop=608:1080:656:0" portrait.mp4 |
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
@interface KIDAppDelegate () | |
@property (nonatomic, strong) UIViewController *hideInformationViewController; | |
@end | |
@implementation KIDAppDelegate | |
{ | |
- (void)applicationWillResignActive:(UIApplication *)application | |
{ | |
[self hideScreen:YES]; |
OlderNewer