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 | |
# origin https://gist.github.com/keith/5b5f61f4cc690aec403afd92aab020c3 | |
altool="$(dirname "$(xcode-select -p)")/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool" | |
appleId="[email protected]" | |
echo "Validating app..." | |
time "$altool" --validate-app --file "$1" --username "$appleId" --password @keychain:"Application Loader: $appleId" | |
echo "Uploading app to iTC..." | |
time "$altool" --upload-app --file "$1" --username "$appleId" --password @keychain:"Application Loader: $appleId" |
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 | |
# Sizes from https://developer.apple.com/library/ios/#qa/qa1686/_index.html | |
# Requirements: ImageMagick | |
function resize { | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
DEFAULT='\033[0m' | |
echo -e "Generating ${BLUE}$3${DEFAULT} at size ${GREEN}$2 ${DEFAULT}" | |
convert $1 -resize $2 $3 |
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
<?xml version="1.1" encoding="UTF-8"?> | |
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!--Last edited by Ukelele version 3.0.2.59 on 2016-02-10 at 08:33 (SEČ)--> | |
<keyboard group="126" id="-22072" maxout="1" name="CZUS"> | |
<layouts> | |
<layout first="0" last="17" mapSet="16c" modifiers="f4"/> | |
<layout first="18" last="18" mapSet="984" modifiers="f4"/> | |
<layout first="21" last="23" mapSet="984" modifiers="f4"/> | |
<layout first="30" last="30" mapSet="984" modifiers="f4"/> | |
<layout first="194" last="194" mapSet="984" modifiers="f4"/> |
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
<?xml version="1.1" encoding="UTF-8"?> | |
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!--Last edited by Ukelele version 3.0.2.59 on 2016-02-03 at 15:36 (SEČ)--> | |
<keyboard group="126" id="-3046" maxout="1" name="US with CZ keys"> | |
<layouts> | |
<layout first="0" last="17" mapSet="16c" modifiers="f4"/> | |
<layout first="18" last="18" mapSet="984" modifiers="f4"/> | |
<layout first="21" last="23" mapSet="984" modifiers="f4"/> | |
<layout first="30" last="30" mapSet="984" modifiers="f4"/> | |
<layout first="194" last="194" mapSet="984" modifiers="f4"/> |
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
static inline BOOL isEmpty(id thing) { | |
return (thing == nil) | |
|| ([thing respondsToSelector:@selector(length)] && [thing length] == 0) | |
|| ([thing respondsToSelector:@selector(count)] && [thing count] == 0) | |
|| ([thing isKindOfClass:[NSNull class]]); | |
} |
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
init |
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
error: Malformed value for push.default: simple | |
error: Must be one of nothing, matching, tracking or current. | |
fatal: bad config file line 31 in /Users/myuser/.gitconfig |
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
# in Ruby with GSL | |
>> m | |
=> GSL::Matrix | |
[ 1.000e+00 -1.000e+00 | |
1.000e+00 0.000e+00 | |
1.000e+00 1.000e+00 ] | |
>> m.svd | |
=> [GSL::Linalg::SV::UMatrix | |
[ -5.774e-01 7.071e-01 | |
-5.774e-01 0.000e+00 |
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
scmStatus = false | |
invisiblesMap = "~ \t┊" | |
TM_RUBY = "$HOME/.rbenv/shims/ruby" | |
PATH = "$HOME/.rbenv/bin:$PATH" | |
fontSmoothing = true | |
excludeFiles = "*.{png,so,pyc,o,scssc}" |
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 UIImage (mxcl) | |
@end | |
@implementation UIImage (mxcl) | |
- (UIStatusBarStyle)preferredStatusBarStyle { | |
UIGraphicsBeginImageContextWithOptions((CGSize){1, 1}, NO, 0.0); | |
[self drawInRect:(CGRect){0, 0, 1, 1}]; | |
UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
NewerOlder