This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSString *)getGMTDateStringfromISO8601DateString:(NSString *)ISODateString | |
{ | |
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZ"]; | |
ISODateString = [ISODateString stringByReplacingOccurrencesOfString:@":" withString:@"" options:0 range:NSMakeRange([ISODateString length]-5, 5)]; | |
NSDate *ISODate = [formatter dateFromString:ISODateString]; | |
[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"]; | |
[formatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.3 (176) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput | |
RangeInput | |
StringInput | |
TextInput | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
module HerokuImport | |
class Db < Thor | |
method_option :keep, :type => :boolean, :default => false | |
method_option :remote, :type => :string, :default => "heroku" | |
method_option :host, :type => :string, :default => "localhost" | |
method_option :user, :type => :string, :default => `whoami`.strip | |
method_option :dbname, :type => :string | |
method_option :dump, :type => :string, :default => "latest.dump" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmailDomainValidator | |
attr_reader :domain | |
def initialize(email) | |
email = Mail::Address.new(email_string) | |
@domain = email.domain | |
end | |
def valid? | |
email.domain.present? && (registered? || operational?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Miha Rekar | |
email = info@mr.si | |
[core] | |
editor = atom -nw | |
[color] | |
ui = 1 | |
[alias] | |
s = status -sb | |
c = commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/mrfoto/.rubies/ruby-2.0.0-p247/bin/ruby -r ./siteconf20140924-20429-1pmwjcu.rb extconf.rb | |
Ruby platform=x86_64-darwin14.0.0 | |
rbsigar_generated.rx needs update | |
generating rbsigar_generated.rx | |
fatal: Not a git repository (or any of the parent directories): .git | |
../../src/sigar.c -> sigar.c | |
../../src/sigar_cache.c -> sigar_cache.c | |
../../src/sigar_fileinfo.c -> sigar_fileinfo.c | |
../../src/sigar_format.c -> sigar_format.c | |
../../src/sigar_getline.c -> sigar_getline.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
require 'json' | |
require 'csv' | |
URL = 'http://apparatus.si/oddaja/pogovor/page/%d/' | |
def last_page | |
doc = Nokogiri::HTML(open(URL%1)) | |
pagination = doc.css('.archive-pagination a') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark/ips' | |
Benchmark.ips do |x| | |
SingleFilterStruct = Struct.new(:method, :values) do | |
def call(value) | |
Array(value).any? { |v| v.send(method, *values) } | |
end | |
end | |
class SingleFilterClass |
OlderNewer