Skip to content

Instantly share code, notes, and snippets.

Avatar

Víctor Pimentel victorpimentel

View GitHub Profile
View HCArgumentCaptor+OCMockitoBridge.h
@import OCHamcrest;
NS_ASSUME_NONNULL_BEGIN
@interface HCArgumentCaptor (OCMockitoBridge)
- (NSObject *)tm_objectValue;
@end
@victorpimentel
victorpimentel / option1.h
Last active Oct 9, 2015
Immutable & mutable models
View option1.h
@interface TMUser1 : NSObject <NSCopying, NSMutableCopying>
@property (nonatomic, copy, readonly) NSString *userId;
@property (nonatomic, copy, readonly) NSString *name;
@property (nonatomic, copy, readonly) NSString *surname;
@property (nonatomic, readonly) NSURL *avatarURL;
- (instancetype)initWithUserId:(NSString *)userId
name:(NSString *)name
surname:(NSString *)surname
View Observer.swift
import Foundation
public protocol Observable : class {
typealias ObserverType
func addObserver(observer : ObserverType)
func removeObserver(observer : ObserverType)
}
let observersAssociatedKey = "observersKey"
@victorpimentel
victorpimentel / gist:3806682
Created Sep 30, 2012
New Shows in TVShows (Fall 2012, September 30)
View gist:3806682
  • 1600 Penn
  • 3 Days to Open with Bobby Flay
  • 666 Park Avenue
  • 8 Out of 10 Cats
  • America's Got Talent
  • Around the World in 80 Plates
  • Arrow
  • Austin City Limits
  • Bar Rescue
  • Beauty and the Beast
@victorpimentel
victorpimentel / gist:1219572
Created Sep 15, 2011
Top languages in TVShows (September 15th)
View gist:1219572
  1. English
  2. Spanish
  3. Chinese
  4. French
  5. Portuguese
  6. German
  7. Dutch
  8. Italian
  9. Swedish
  10. Norwegian
@victorpimentel
victorpimentel / gist:1204865
Created Sep 8, 2011
New Shows in TVShows (Fall 2011, September 8)
View gist:1204865
  1. 2 Broke Girls
  2. A Gifted Man
  3. Alcatraz
  4. American Horror Story
  5. Apartment 23
  6. Are You There, Vodka? It's Me, Chelsea
  7. Awake
  8. Boss (2011)
  9. Charlie's Angels (2011)
  10. Free Agents
@victorpimentel
victorpimentel / gist:1180746
Created Aug 30, 2011
Top shows in TVShows (August 30th)
View gist:1180746
  1. The Big Bang Theory
  2. Game of Thrones
  3. True Blood
  4. Dexter
  5. Breaking Bad
  6. Fringe
  7. Futurama
  8. The Walking Dead
  9. House
  10. How I Met Your Mother
@victorpimentel
victorpimentel / gist:1177300
Created Aug 28, 2011
New shows in TVShows (28 august)
View gist:1177300
Are We There Yet?
Army Wives
Batman: The Brave &amp; the Bold
Blue Mountain State
Britain's Got Talent
Celebrity Rehab with Dr. Drew
Foyle's War
Gene Simmons: Family Jewels
Ghost Hunters
Ghost Hunters International
@victorpimentel
victorpimentel / find_followers.rb
Created Dec 21, 2010
Quick Twitter bot for following people that tweet about a certain phrase
View find_followers.rb
require 'rubygems'
require 'open-uri'
require 'hpricot'
require 'twitter'
doc = Hpricot(open('http://wikipedal.org/', 'User-Agent' => 'ruby'))
cocktail = (doc / '#mp-tfa .mw-headline').text.strip
Twitter.configure do |config|
config.consumer_key = 'YOUR_CONSUMER_KEY'
You can’t perform that action at this time.