Install development packages via Brew. If you're using OS X 10.12+, install osxfuse via cask as Brew suggest in error output.
brew tap homebrew/fuse
brew install --HEAD usbmuxd
brew install --HEAD libimobiledevice
brew install --HEAD ifuse
| #!/usr/bin/env bash | |
| # This script backs up the Gramps-Web database in ".gramps" format. | |
| # Back them up together with the "media" volume to have a restorable app backup. | |
| set -euo pipefail | |
| # Access | |
| BASE_URL='https://demo.grampsweb.org' # without trailing slash | |
| USERNAME='owner' | |
| PASSWORD='owner' |
| // Swift version of the code from http://stackoverflow.com/a/30335594/1986600 | |
| import CoreTelephony | |
| override func awakeFromNib() { | |
| super.awakeFromNib() | |
| let isCapableToCall: Bool | |
| if UIApplication.sharedApplication().canOpenURL(NSURL(string: "tel://")!) { | |
| // Check if iOS Device supports phone calls |
| :beep frequency=264 length=250ms; | |
| :delay 500ms; | |
| :beep frequency=264 length=250ms; | |
| :delay 250ms; | |
| :beep frequency=297 length=1000ms; | |
| :delay 250ms; | |
| :beep frequency=264 length=1000ms; | |
| :delay 250ms; | |
| :beep frequency=352 length=1000ms; | |
| :delay 250ms; |
| typedef CF_ENUM(int, CFNetworkErrors) { | |
| kCFHostErrorHostNotFound = 1, | |
| kCFHostErrorUnknown = 2, // Query the kCFGetAddrInfoFailureKey to get the value returned from getaddrinfo; lookup in netdb.h | |
| // SOCKS errors; in all cases you may query kCFSOCKSStatusCodeKey to recover the status code returned by the server | |
| kCFSOCKSErrorUnknownClientVersion = 100, | |
| kCFSOCKSErrorUnsupportedServerVersion = 101, // Query the kCFSOCKSVersionKey to find the version requested by the server | |
| // SOCKS4-specific errors | |
| kCFSOCKS4ErrorRequestFailed = 110, // request rejected or failed by the server | |
| kCFSOCKS4ErrorIdentdFailed = 111, // request rejected because SOCKS server cannot connect to identd on the client |
| #!/bin/bash | |
| # Provides list of gems that have nothing depending on them | |
| for target in $(gem list -l --no-verbose | cut -d ' ' -f 1); do | |
| if [ "$(gem dependency -lr $target | wc -l)" -eq 2 ]; then | |
| echo "$target" | |
| fi | |
| done |
| // Taken from http://www.slideshare.net/manuelmaly/reactivecocoa-goodness-part-i-of-ii | |
| // Exact presentation slide: http://image.slidesharecdn.com/presentation-141009165841-conversion-gate01/95/reactivecocoa-goodness-part-i-of-ii-37-638.jpg?cb=1412892113 | |
| // Try to repeat signal 3 times | |
| static NSUInteger const retryAttempts = 2; | |
| static NSTimeInterval const retrydelay = 1.; | |
| RACSignal *signal = ...; | |
| RACSignal *result = [[signal catch:^RACSignal *(NSError *error) { | |
| return [[[RACSignal empty] delay:retrydelay] |
| #import <UIKit/UIKit.h> | |
| /// This constraint could be toggled between two values (min/max) by `enlarged` flag | |
| @interface ToggleConstraint : NSLayoutConstraint | |
| /** | |
| Max size of the height/width/offset/etc. | |
| Think about it as some UI element can change it's size between min and max values. | |
| */ | |
| @property (nonatomic, assign) IBInspectable BOOL enlarged; |
| ; Store path: %userprofile%/Documents/AutoHotkey.ahk | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; | |
| ; Keyboard layout swithing | |
| ; | |
| ; See the language identifiers list here: | |
| ; http://msdn.microsoft.com/en-us/library/dd318693%28v=vs.85%29.aspx | |
| ; |
| #define INC_SYSTEM_VERSION(v) ((NSOperatingSystemVersion){v.majorVersion, v.minorVersion + 1, 0}) | |
| #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:v] | |
| #define SYSTEM_VERSION_LESS_THAN(v) (!SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)) | |
| #define SYSTEM_VERSION_EQUAL_TO(v) (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) && (!SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(INC_SYSTEM_VERSION(v)))) | |
| #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) (SYSTEM_VERSION_LESS_THAN(v) || SYSTEM_VERSION_EQUAL_TO(v)) | |
| #define SYSTEM_VERSION_GREATER_THAN(v) (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) && (!SYSTEM_VERSION_EQUAL_TO(v))) | |
| /* | |
| // Manual logical check | |
| NSOperatingSystemVersion v = (NSOperatingSystemVersion){8, 4, 0}; |