Skip to content

Instantly share code, notes, and snippets.

View donjordano's full-sized avatar
🏠
WFH

Ivan Yordanov donjordano

🏠
WFH
View GitHub Profile
### Keybase proof
I hereby claim:
* I am donjordano on github.
* I am donjordano (https://keybase.io/donjordano) on keybase.
* I have a public key whose fingerprint is 4E75 3EB4 FDA3 9BF2 E1FF 62FD 61CE C0E8 5D3D E1A7
To claim this, I am signing this object:
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
#import <Foundation/Foundation.h>
@interface NSArray (UniqueObjects)
-(NSArray*) uniqueObjects;
-(NSArray*) uniqueObjectsSortedUsingSelector: (SEL)comparator;
-(NSArray*) uniqueObjectsSortedUsingFunction: (NSInteger (*)(id, id, void *)) comparator
@donjordano
donjordano / gist:6376170
Created August 29, 2013 09:47
All country codes and names retrieve from: http://countrycode.org/ and written in plist. For parsing HTML I'm using this: https://github.com/topfunky/hpple
NSURL *url = [NSURL URLWithString:@"http://countrycode.org/"];
NSData * data = [NSData dataWithContentsOfURL:url];
TFHpple * doc = [[TFHpple alloc] initWithHTMLData:data];
NSArray *ar = [doc searchWithXPathQuery:@"/html/body/div/div[2]/div/div[2]/table/tbody"];
TFHppleElement *element = [ar objectAtIndex:0];
NSArray *children = [element children];
@donjordano
donjordano / Readme.markdown
Created October 10, 2012 11:05 — forked from gonecoding/Readme.markdown
Adding methods to NSData and NSString using categories to provide AES256 encryption on iOS

Important notice

I took down this Gist due to concerns about the security of the encryption/decryption part of this code (see comments below).

Rob Napier (@rnapier) has created a publicly available class that provides similar AES encryption/decryption functionality at https://github.com/rnapier/RNCryptor.

<script type="text/javascript">
$(function(){
// choose either the full version
$(".multiselect").multiselect();
// or disable some features
$(".multiselect").multiselect({sortable: false, searchable: false});
});
</script>