Skip to content

Instantly share code, notes, and snippets.

View jayesh15111988's full-sized avatar

Jayesh Kawli jayesh15111988

View GitHub Profile
@riley-dog
riley-dog / State.h
Created November 2, 2013 01:43
States in NSArray using Objective-C new literals/syntax
//
// States.h
// CrediteraIOS
//
// Created by Buddha on 10/24/13.
// Copyright (c) 2013 Buddha Soumpholphakdy. All rights reserved.
//
#import <Foundation/Foundation.h>
@oropon
oropon / gist:5159805
Created March 14, 2013 08:39
My recursive description (iOS/OSX)(ARC/ManualMemoryManagement)
#if TARGET_OS_IPHONE
@interface UIView (RecursiveDescription)
#else
@interface NSView (RecursiveDescription)
#endif
#ifdef DEBUG
- (NSString*)_recursiveDescription;
#endif
@end
@mattt
mattt / nshipster-new-years-2015.md
Created November 25, 2014 19:38
NSHipster New Year's 2015

Season's Greetings, NSHipsters!

As the year winds down, and we take a moment to reflect on our experiences over the past months, one thing is clear: 2014 has been an incredible year professionally for Apple developers. So much has happened in such a short timespan, and yet it's hard to remember our relationship to Objective-C before Swift, or what APIs could have captivated our imagination as much as iOS 8 or WatchKit.

It's an NSHipster tradition to ask you, dear readers, to send in your favorite tips and tricks from the past year for publication over the New Year's holiday. This year, with the deluge of new developments—both from Cupertino and the community at large—there should be no shortage of interesting tidbits to share.

Submit your favorite piece of Swift or Objective-C trivia, framework arcana, hidden Xcode feature, or anything else you think is cool, and you could have it featured in the year-end blowout article. Just comment on this gist below!

If you're wondering about what to post, look to

import Foundation
public extension String {
public func replacing(range: CountableClosedRange<Int>, with replacementString: String) -> String {
let start = characters.index(characters.startIndex, offsetBy: range.lowerBound)
let end = characters.index(start, offsetBy: range.count)
return self.replacingCharacters(in: start ..< end, with: replacementString)
}
}
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "4"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@d-a-n
d-a-n / EuropeaniOSDevConferences2018.md
Last active October 8, 2018 11:45
European iOS Dev Conferences for 2018

European iOS Dev Conferences for 2018

Dates Conference Location
Jan 29. dotSwift Paris
March 15. - 16. appdevcon Amsterdam
March 22. - 23. iOSCon London
April 16. - 17. Appbuilders Lugano
May 08. - 11. Craft-Conf Budapest
May 13. - 16. UIKonf Berlin
import lldb
import commands
def __lldb_init_module (debugger, dict):
debugger.HandleCommand('command script add -f LBRShortcut.window_description_command window_description')
debugger.HandleCommand('command script add -f LBRShortcut.json_data_command json_data')
debugger.HandleCommand('command script add -f LBRShortcut.fire_fault_command fire_fault')
def window_description_command(debbuger, command, result, dict):
@shazron
shazron / sim-run.sh
Created October 25, 2011 21:53
Run Xcode Simulator project from the command line
#!/bin/bash
#
# Build and iPhone Simulator Helper Script
# Shazron Abdullah 2011
#
# WARN: - if your .xcodeproj name is not the same as your .app name,
# this won't work without modifications
# - you must run this script in where your .xcodeproj file is
PROJECTNAME=$1
@steverichey
steverichey / Iconizer.sh
Last active February 23, 2022 17:40
Create iOS application icons from one PDF file. Requires ImageMagick.
#!/bin/sh
#
# Iconizer shell script by Steve Richey (srichey@floatlearning.com)
#
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file.
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets
# Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject
#
# Requires ImageMagick: http://www.imagemagick.org/