Pre-requisites
- Crashplan account
- FreeNAS-9.1.1-RELEASE-x64 (a752d35)
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
Pre-requisites
@import MobileCoreServices; | |
static CFStringRef UTTypeForImageData(NSData *data) { | |
const unsigned char * bytes = [data bytes]; | |
if (data.length >= 8) { | |
if (bytes[0] == 0x89 && bytes[1] == 0x50 && bytes[2] == 0x4E && bytes[3] == 0x47 && bytes[4] == 0x0D && bytes[5] == 0x0A && bytes[6] == 0x1A && bytes[7] == 0x0A) { | |
return kUTTypePNG; | |
} | |
} |
# Do *not* load any libs here that are *not* part of Ruby’s standard-lib. Ever. | |
desc "Install all dependencies" | |
task :bootstrap do | |
if system('which bundle') | |
sh "bundle install" | |
sh "git submodule update --init" | |
# etc | |
else | |
$stderr.puts "\033[0;31m[!] Please install the bundler gem manually: $ [sudo] gem install bundler\e[0m" |
// | |
// LTClientBrowser.h | |
// LayerTreeServer | |
// | |
// Created by Indragie Karunaratne on 2014-05-21. | |
// Copyright (c) 2014 Indragie Karunaratne. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <LayerTreeKit/LayerTreeKit.h> |
@interface UIWindow (resize) | |
-(void)_adjustSizeClassesAndResizeWindowToFrame:(CGRect)frame; | |
@end | |
typedef enum _UICustomRes | |
{ | |
UICustomResiPadTwoThirds, | |
UICustomResiPadHalf, | |
UICustomResiPadOneThird, | |
UICustomResiPhone47, |
// | |
// Warnings.xcconfig | |
// | |
// The list of warnings we (don’t) use, and the reasons why. | |
// | |
// :MARK: Warnings in use: | |
// :MARK: -everything | |
// We want the best possible diagnostics, so we simply enable everything that exists, and then opt–out of what doesn’t make sense for us. | |
// | |
// :MARK: - Warnings not to be promoted: |
BOOL PSPDFSystemFunctionOverriddenInCategory(Class theClass, SEL selector, NSString *__autoreleasing* categoryName) { | |
NSCParameterAssert(theClass); | |
NSCParameterAssert(selector); | |
Dl_info info; | |
if (dladdr(class_getMethodImplementation(theClass, selector), &info)) { | |
// /System/Library/Frameworks is a common denominator, some methods are in /usr/lib/libobjc.A.dylib | |
// Custom app is in /private/var/mobile/Containers/Bundle/Application/<UID>/PSPDFCatalog.app/PSPDFCatalog | |
if (!strstr(info.dli_fname, "/System/Library") && !strstr(info.dli_fname, "/usr/lib")) { | |
if (categoryName) *categoryName = @(info.dli_sname); |
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |