Skip to content

Instantly share code, notes, and snippets.

View tudormunteanu's full-sized avatar
👨‍💻
Crafting and leading. Mostly Web3 these days. 🛠️🚀 #TechLeader

Tudor Munteanu tudormunteanu

👨‍💻
Crafting and leading. Mostly Web3 these days. 🛠️🚀 #TechLeader
View GitHub Profile
Personal Hub Ideas (work in progress)
features:
* get RSS updates/twitter timeline/emails/notifications/search alerts/...
* remove duplicates/copy&paste articles
* server based - to be able to read from desktop/iphone
* easy to import/export data - apml
* quick glance - see quickly if it is worth reading now (tag cloud sorted by occurrence)
* postrank - highlight important items (see postrank.com) and discover new sources
* easy to bookmark/share.
@tudormunteanu
tudormunteanu / random UI color
Created September 11, 2011 16:06
random UI color
- (UIColor *) getRandomColor {
return [UIColor colorWithRed:(arc4random()%100)/(float)100
green:(arc4random()%100)/(float)100
blue:(arc4random()%100)/(float)100
alpha:1];
}
- (id) init {
self = [super init];
if (self != nil) {
}
return self;
}
- (id) initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self != nil) {
}
return self;
}
self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
[self.view setBackgroundColor:[UIColor redColor]];
@tudormunteanu
tudormunteanu / gist:1312148
Created October 25, 2011 10:11
UIView with rounded corners
UIView *container = [[UIView alloc] initWithFrame:rect];
// radius
container.layer.cornerRadius = 5;
// shadow path
container.layer.cornerRadius = 20;
container.layer.shadowColor = [[UIColor blackColor] CGColor];;
container.layer.masksToBounds = NO;
container.layer.shadowOffset = CGSizeMake(0, -10);
container.layer.shadowOpacity = 0.4;
@tudormunteanu
tudormunteanu / gist:1316898
Last active September 27, 2015 18:58
XCode .gitignore
# Created by http://www.gitignore.io
### Objective-C ###
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
@tudormunteanu
tudormunteanu / gist:1319222
Created October 27, 2011 10:14
UIView shadow
self.layer.shadowColor = [UIColor blackColor].CGColor;
self.layer.shadowOpacity = 0.4;
self.layer.shadowRadius = 5;
self.layer.shadowOffset = CGSizeMake(5.0f, 5.0f);
@tudormunteanu
tudormunteanu / gist:1319229
Created October 27, 2011 10:27
shadow path
self.layer.shadowColor = [[UIColor blackColor] CGColor];
self.layer.masksToBounds = NO;
self.layer.shadowOffset = CGSizeMake(5, 5);
self.layer.shadowOpacity = 0.4;
CGPathRef shadowPath = [UIBezierPath bezierPathWithRect:CGRectInset(self.layer.bounds, 0, 0)].CGPath;
self.layer.shadowPath = shadowPath;
@tudormunteanu
tudormunteanu / gist:1803383
Last active September 30, 2015 14:07
GCD multi-threading async dispatch
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
// stuff to do in the background
dispatch_async(dispatch_get_main_queue(), ^{
// stuff to do on the main thread
});