Skip to content

Instantly share code, notes, and snippets.

View ksm's full-sized avatar
🏔️

Karol S. Mazur ksm

🏔️
View GitHub Profile
//
// NSObject+BlockObservation.h
// Version 1.0
//
// Andy Matuschak
// andy@andymatuschak.org
// Public domain because I love you. Let me know how you use it.
//
#import <Cocoa/Cocoa.h>
@rafi
rafi / gource-commands.txt
Created April 14, 2010 15:26 — forked from alkavan/gource-commands.txt
Gource command
################################
gource commands
################################
# basic command for big and long projects
gource --max-user-speed 500 --seconds-per-day 0.05 --file-idle-time 10 -e 0.005 -f --max-files 300 --hide-files
# some easy to understand commands
# for output file
--output-ppm-stream ~/ppm/ppm-kohana
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@dhoerl
dhoerl / KeychainItemWrapper.h
Last active April 4, 2023 08:15
KeychainItemWrapper ARCified. Added the ability to manage a dictionary in place of just a string - the #define PASSWORD_USES_DATA in the .m file switches the mode.
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
@kluivers
kluivers / .gitignore
Created February 27, 2012 11:48
.gitignore for Xcode projects
# .gitignore in use by Joris Kluivers
#
# Latest version:
# https://gist.github.com/gists/1923197
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@Diggz
Diggz / lyrics.txt
Created April 22, 2012 18:43 — forked from pjg/lyrics.txt
Piano Man by Johnny Diggz @ Railsberry
It's 8:00 o'clock on a Friday
The regular crowd shuffles in
there's an old man sitting next to me
making love to his beer
la la di di da
la la di di da
Sing us a song, you're the piano man!
sing us a song tonight
@0xced
0xced / XCDFakeCarrier.m
Last active March 5, 2023 22:07
Hack to choose the displayed carrier name in the iOS simulator
//
// Copyright (c) 2012-2015 Cédric Luthi / @0xced. All rights reserved.
//
#import <Foundation/Foundation.h>
#if TARGET_OS_SIMULATOR
static const char *fakeCarrier;
static const char *fakeTime;
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active April 23, 2024 02:53
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@mikeash
mikeash / test.m
Created July 9, 2012 21:15
Cocoa array slicing
// clang -framework Foundation -fobjc-arc -O3 test.m
#import <Foundation/Foundation.h>
@interface Slice : NSObject
@property NSInteger start;
@property NSInteger length;
@end
@implementation Slice