Skip to content

Instantly share code, notes, and snippets.

View victorpimentel's full-sized avatar

Víctor Pimentel victorpimentel

View GitHub Profile
@victorpimentel
victorpimentel / AnimatedChart.swift
Last active June 20, 2022 21:57 — forked from robb/AnimatedChart.swift
Extract point to a different chart
import Charts
import SwiftUI
struct Sample: Identifiable {
var x: Double
var y: Double
var id: some Hashable { x }
}
@import OCHamcrest;
NS_ASSUME_NONNULL_BEGIN
@interface HCArgumentCaptor (OCMockitoBridge)
- (NSObject *)tm_objectValue;
@end
@victorpimentel
victorpimentel / option1.h
Last active October 9, 2015 16:11
Immutable & mutable models
@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
@victorpimentel
victorpimentel / Observer.swift
Last active October 3, 2015 13:01 — forked from diegosanchezr/Observer.swift
Observers 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 September 30, 2012 13:04
New Shows in TVShows (Fall 2012, September 30)
  • 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 September 15, 2011 15:34
Top languages in TVShows (September 15th)
  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 September 8, 2011 21:51
New Shows in TVShows (Fall 2011, September 8)
  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 August 30, 2011 12:07
Top shows in TVShows (August 30th)
  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 August 28, 2011 22:07
New shows in TVShows (28 august)
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 December 21, 2010 15:58
Quick Twitter bot for following people that tweet about a certain phrase
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'