Skip to content

Instantly share code, notes, and snippets.

@croath
croath / emoji.md
Last active October 9, 2016 08:05
iOS 10 Emojis

iOS 10 Emojis

  • SMILEYS & PEOPLE

    😀😬😁😂😃😄😅😆😇😉😊🙂🙃☺️😋😌😍😘😗😙😚😜😝😛🤑🤓😎🤗😏😶😐😑😒🙄🤔😳😞😟😠😡😔😕🙁☹️😣😖😫😩😤😮😱😨😰😯😦😧😢😥😪😓😭😵😲🤐😷🤒🤕😴💤💩😈👿👹👺👻💀☠️👽👾🤖😺😸😹😻😼😽🙀😿😾🙌👏👍👎👊✊👋👈👉👆👇👌☝️✌️✋🖐👐💪🙏🖖🤘🖕✍️💅👄👅👂👃👁👀🗣👤👥👶👦👧👨👩👱‍♀️👱👴👵👲👳‍♀️👳👮‍♀️👮👷‍♀️👷💂‍♀️💂🕵️‍♀️🕵🎅👸👰👰👼👼🙇‍♀️🙇💁💁‍♂️🙅🙅‍♂️🙆🙆‍♂️🙋🙋‍♂️🙎🙎‍♂️🙍🙍‍♂️💇💇‍♂️💆💆‍♂️💃👯👯‍♂️🚶‍♀️🚶🏃‍♀️🏃👫👭👬💑👩‍❤️‍👩👨‍❤️‍👨💏👩‍❤️‍💋‍👩👨‍❤️‍💋‍👨👪👨‍👩‍👧👨‍👩‍👧‍👦👨‍👩‍👦‍👦👨‍👩‍👧‍👧👩‍👩‍👦👩‍👩‍👧👩‍👩‍👧‍👦👩‍👩‍👦‍👦👩‍👩‍👧‍👧👨‍👨‍👦👨‍👨‍👧👨‍👨‍👧‍👦👨‍👨‍👦‍👦👨‍👨‍👧‍👧👩‍👦👩‍👧👩‍👧‍👦👩‍👦‍👦👩‍👧‍👧👨‍👦👨‍👧👨‍👧‍👦👨‍👦‍👦👨‍👧‍👧👚👕👖👔👗👙👘💄💋👣👠👡👢👞👟👒🎩🎓👑⛑🎒👝👛👜💼👓🕶💍🌂

  • ANIMALS & NATURE

    🐶🐱🐭🐹🐰🐻🐼🐨🐯🦁🐮🐷🐽🐸🐙🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🐺🐗🐴🦄🐝🐛🐌🐞🐜🕷🦂🦀🐍🐢🐠🐟🐡🐬🐳🐋🐊🐆🐅🐃🐂🐄🐪🐫🐘🐐🐏🐑🐎🐖🐀🐁🐓🦃🕊🐕🐩🐈🐇🐿🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿☘️🍀🎍🎋🍃🍂🍁🌾🌺🌻🌹🌷🌼🌸💐🍄🌰🎃🐚🕸🌎🌍🌏🌕🌖🌗🌘🌑🌒🌓🌔🌚🌝🌛🌜🌞🌙⭐️🌟💫✨☄️☀️🌤⛅️🌥🌦☁️🌧⛈🌩⚡️🔥💥❄️🌨☃️⛄️🌬💨🌪🌫☂️☔️💧💦🌊

@croath
croath / NSObject+Cool.h
Created July 18, 2016 08:06
Availability
//
// NSObject+Cool.h
// PatriciaTest
//
// Created by croath on 7/18/16.
// Copyright © 2016 Croath. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Availability.h>
@croath
croath / Apple Mobile Product Names
Created March 23, 2016 08:31
Apple Mobile Product Names
@"i386" on 32-bit Simulator
@"x86_64" on 64-bit Simulator
@"iPod1,1" on iPod Touch
@"iPod2,1" on iPod Touch Second Generation
@"iPod3,1" on iPod Touch Third Generation
@"iPod4,1" on iPod Touch Fourth Generation
@"iPod7,1" on iPod Touch 6th Generation
@"iPhone1,1" on iPhone
@"iPhone1,2" on iPhone 3G
@"iPhone2,1" on iPhone 3GS
NSURL *rtfPath = [[NSBundle mainBundle] URLForResource: @"description_ar" withExtension:@"rtf"];
NSAttributedString *attributedStringWithRtf = [[NSAttributedString alloc] initWithFileURL:rtfPath options:@{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType} documentAttributes:nil error:nil];
self.textView.attributedText=attributedStringWithRtf;
@croath
croath / pearson.rb
Created August 14, 2014 09:38
pearson
def ruby_pearson(x,y)
n=x.length
sumx=x.inject(0) {|r,i| r + i}
sumy=y.inject(0) {|r,i| r + i}
sumxSq=x.inject(0) {|r,i| r + i**2}
sumySq=y.inject(0) {|r,i| r + i**2}
prods=[]; x.each_with_index{|this_x,i| prods << this_x*y[i]}
var mc:CUnsignedInt = 0
var mlist:UnsafePointer<Method> = class_copyMethodList(UIImageView.classForCoder(), &mc);
println("\(mc) methods")
for var i:CUnsignedInt = 0; i < mc; i++ {
println("Method #\(i): \(sel_getName(method_getName(mlist.memory)))")
mlist = mlist.succ()
}
- (NSArray*)findAllLabelsOfView:(UIView*)view{
NSMutableArray *array = [NSMutableArray array];
NSArray *subViews = view.subviews;
if ([view isKindOfClass:[UILabel class]]) {
[array addObject:view];
}
if (subViews.count) {
[subViews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[array addObjectsFromArray:[self findAllLabelsOfView:obj]];
}];
@croath
croath / rmapp.rb
Created April 23, 2014 06:52
Remove specific apps installed in iPhone simulator.
require 'fileutils'
class String
def numeric?
return true if self =~ /^\d+$/
true if Float(self) rescue false
end
end
def remove_app (app_name)
@croath
croath / commands.sh
Created April 18, 2014 19:03
show command using rate
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)\
print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" \
| column -c3 -s " " -t | sort -nr | nl | head -n10
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0
//awesome! need to check usr/include/AvailabilityInternal.h