Skip to content

Instantly share code, notes, and snippets.

@StefanLage
StefanLage / Breakpoints_v2.xcbkptlist
Last active January 7, 2016 09:17
My Xcode BreakPoints file
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@StefanLage
StefanLage / gist:f545abdb10f4824bfa93
Created October 28, 2015 14:14
VMWare Fusion 6 and later - Disable "Auto fit"
edit VMware preference file : ~/Library/Preferences/VMware\ Fusion/preferences
add these two lines:
pref.autoFitGuestToWindow = "FALSE"
pref.autoFitFullScreen = "stretchGuestToHost"
The 1st line disables auto fit for Single Window mode.
The 2nd one disable it for Full Screen mode
@StefanLage
StefanLage / UITabBarController+HideViews.h
Last active October 23, 2015 14:34
Hide selected controllers you don't want to appear in a UITabBarController from the Storyboard
#import <UIKit/UIKit.h>
@interface UITabBarController (HideViews)
@property (nonatomic, strong) NSString *hideViews;
@end
@StefanLage
StefanLage / NSMutableDictionary+Minus.h
Created February 23, 2015 14:07
Removes each key/value in another given dictionary from the receiving dictionary, if present.
#import <Foundation/Foundation.h>
@interface NSMutableDictionary (Minus)
-(void) minusDictionary:(NSDictionary*)otherDictionary;
@end
@StefanLage
StefanLage / NSString+Reverse.h
Created February 13, 2015 08:05
Reverse an NSString using XOR swap (import file: https://gist.github.com/StefanLage/febc88228b548689571d)
#import <Foundation/Foundation.h>
@interface NSString (Reverse)
+(NSString*)stringReverse:(NSString*)str;
@end
@StefanLage
StefanLage / NSString+Char.h
Last active August 29, 2015 14:15
Convert a NSString to a char pointer
#import <Foundation/Foundation.h>
@interface NSString (Char)
-(char *)toChar;
@end
@StefanLage
StefanLage / Array-Equilibrium
Last active March 31, 2022 19:59
Technical Interview : Equilibrium index of an Array
int equilibrium (int A[], int n){
int sum = 0;
int solution = -1;
int leftSum = 0;
int rightSum = 0;
// Calculate the sum of all P in A
for (int i = 0; i < n; i++)
sum += A[i];
// Try to find an equilibrium -> if yes return the first one
for (int i = 0; i < n; i++){
#import <Foundation/Foundation.h>
@interface HLOrder : NSObject
@property (strong, nonatomic) NSString *identifier;
@property (strong ,nonatomic) NSString *status;
@property (strong, nonatomic) NSArray *products;
@end