Skip to content

Instantly share code, notes, and snippets.

@zeroelink
zeroelink / sublime-text-3-setup.md
Created February 12, 2017 01:18 — forked from ijy/sublime-text-3-setup.md
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@zeroelink
zeroelink / makeapp.sh
Last active August 29, 2015 14:12 — forked from demonbane/makeapp.sh
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"
@zeroelink
zeroelink / NSString+SyntacticSugar.m
Last active August 29, 2015 14:05
NSString SyntacticSugar Category
#define NUMARGS(...) (sizeof((id[]){__VA_ARGS__})/sizeof(id))
#define $(...) ([NSString concatenateObjectsWithObjectCount:NUMARGS(__VA_ARGS__) objectList:__VA_ARGS__])
#import <Foundation/Foundation.h>
@interface NSString (SyntacticSugar)
+ (instancetype)concatenateObjectsWithObjectCount:(NSInteger)count objectList:(id)firstObject, ...;
@end
#!/bin/sh
# Script for managing build and version numbers using git and agvtool.
# Change log:
# v1.0 18-Jul-11 First public release.
# v1.1 29-Sep-12 Launch git, agvtool via xcrun.
version() {
@zeroelink
zeroelink / ModernerObjective-C.m
Created August 18, 2012 22:20
Objective-C NSDictionary Wish
myArray = @[ item1, item2, item3 ];
myDict = @{ key1: value1, key2: value2 };
@zeroelink
zeroelink / ComparingObjective-C.m
Created August 18, 2012 22:11
Objective-C NSDictionary Before
// Old way
NSDictionary *oldDict = [NSDictionary dictionaryWithObjectsAndKeys: value1, key1, value2, key2, nil];
// New way
NSDictionary *newDict = @{ key1: value1, key2: value2 };
//
// NSObject+subscripts.h
// Created by Martin Santiago on 7/26/12.
//
#import <Foundation/Foundation.h>
// Add support for subscripting to the iOS 5 SDK.
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
@interface NSObject (subscripts)