Skip to content

Instantly share code, notes, and snippets.

View sendoa's full-sized avatar

Sendoa Portuondo sendoa

View GitHub Profile
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include
#!/bin/sh
# Create a RAM disk with same perms as mountpoint
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions
# Usage: sudo ./xcode_ramdisk.sh start
USERNAME=$(logname)
TMP_DIR="/private/tmp"
RUN_DIR="/var/run"
SYS_CACHES_DIR="/Library/Caches"
@sendoa
sendoa / .gitignore
Last active October 18, 2015 14:42
Sendoa's .gitignore for Xcode projects
# Some ideas taken from https://gist.github.com/adamgit/3786883
# OS X
.DS_Store
*.swp
*.lock
profile
.LSOverride
# Thumbnails
@sendoa
sendoa / .gitattributes
Last active January 29, 2019 18:41
Sendoa's .gitattributes for Xcode Projects
# Read http://robots.thoughtbot.com/xcode-and-git-bridging-the-gap for an explanation
# Read https://roadfiresoftware.com/2015/09/automatically-resolving-git-merge-conflicts-in-xcodes-project-pbxproj/ for more
*.pbxproj merge=union
*.strings text diff
@sendoa
sendoa / xcode-git-config.sh
Created February 12, 2014 16:15
Setup initial Git setup for Xcode projects
#!/bin/sh
curl -s https://gist.github.com/sendoa/8952600/raw/bc1854640d8653d125239d112ad64537a82dd0a7/.gitignore > .gitignore
curl -s https://gist.github.com/sendoa/8957654/raw/1bc1f29b9a5e87e5ab8ee8cd7b3e8ae86d126b83/.gitattributes > .gitattributes
@sendoa
sendoa / gist:19c4453ee76c37527771
Created May 8, 2014 14:36 — forked from odrobnik/gist:2106f26379fd609d4ed3
Hide status bar & navigation bar together
- (IBAction)handleTap:(id)sender
{
BOOL isHiding = !_statusBarHidden;
_statusBarHidden = isHiding;
[UIView animateWithDuration:UINavigationControllerHideShowBarDuration delay:0 options:0
animations:^{
[self setNeedsStatusBarAppearanceUpdate];
}
completion:NULL];
#import <Foundation/Foundation.h>
// typedef
typedef NSString*(^ConvertBlock)(NSString *text);
@interface Thing : NSObject
@property (nonatomic, strong) void (^coolPropertyBlock)(NSString *text); // Property
// method param
- (void)doSomething:(void(^)(NSString *text))block with:(NSString *)person;
@sendoa
sendoa / .gitignore
Last active May 7, 2021 12:33
Sendoa's .gitignore for Laravel+PHPStorm projects
/node_modules
/public/storage
/storage/*.key
/vendor
Homestead.yaml
Homestead.json
.env
# ====== OS X ===========================================
.DS_Store
//
// BinaryDataScanner.m
//
// Copyright 2009 Dave Peck <davepeck [at] davepeck [dot] org>. All rights reserved.
// http://davepeck.org/
//
// This class makes it quite a bit easier to read sequential binary files in Objective-C.
//
// This code is released under the BSD license. If you use it in your product, please
// let me know and, if possible, please put me in your credits.
@sendoa
sendoa / ios7statusbar.md
Last active August 29, 2015 14:25 — forked from hujunfeng/ios7statusbar.md
About iOS 7 Status Bar Style

UIStatusBarStyle in iOS 7

  • The status bar in iOS 7 is transparent, the view behind it shows through.

  • The style of the status bar refers to the appearances of its content. In iOS 7, the status bar content is either dark (UIStatusBarStyleDefault) or light (UIStatusBarStyleLightContent). Both UIStatusBarStyleBlackTranslucent and UIStatusBarStyleBlackOpaque are deprecated in iOS 7.0. Use UIStatusBarStyleLightContent instead.

How to change UIStatusBarStyle

  • If below the status bar is a navigation bar, the status bar style will be adjusted to match the navigation bar style (UINavigationBar.barStyle):