Skip to content

Instantly share code, notes, and snippets.

View JonasNielsen's full-sized avatar

Jonas Bylov JonasNielsen

View GitHub Profile
$ rake clean:all
bubble-wrap/network-indicator requires iOS to use.
WARNING! BubbleWrap::HTTP is deprecated and will be removed, see https://github.com/rubymotion/BubbleWrap/issues/308
WARNING! Switch to a different networking library soon - consider AFNetworking: http://afnetworking.com/
WARNING! You can use the 'bubble-wrap-http' gem if you need compatibility: https://github.com/rubymotion/BubbleWrap-HTTP
Delete ./build
Clean ./Pods.xcodeproj for platform `MacOSX'
Clean ./Pods.xcodeproj [AFNetworking - Release]
Clean ./Pods.xcodeproj [GTMHTTPFetcher - Release]
Clean ./Pods.xcodeproj [Reachability - Release]
$ rake clean:all
bubble-wrap/network-indicator requires iOS to use.
WARNING! BubbleWrap::HTTP is deprecated and will be removed, see https://github.com/rubymotion/BubbleWrap/issues/308
WARNING! Switch to a different networking library soon - consider AFNetworking: http://afnetworking.com/
WARNING! You can use the 'bubble-wrap-http' gem if you need compatibility: https://github.com/rubymotion/BubbleWrap-HTTP
Delete ./build
Delete vendor/Pods/Resources/GTMOAuth2Window.nib
Clean ./Pods.xcodeproj for platform `MacOSX'
Clean ./Pods.xcodeproj [AFNetworking - Release]
Clean ./Pods.xcodeproj [GTMHTTPFetcher - Release]
# setup inputs
file_output = AVCaptureMovieFileOutput.alloc.init
# [Add recording session input to file_output]
file_output.startRecordingToOutputFileURL(@file_url, recordingDelegate: self)
# Stream data from file while recording to it
input_stream = NSInputStream.inputStreamWithFileAtPath(@file_url)
input_stream.setDelegate(self)
input_stream.scheduleInRunLoop(NSRunLoop.currentRunLoop, forMode:NSDefaultRunLoopMode)
@JonasNielsen
JonasNielsen / gist:5415216
Created April 18, 2013 18:45
Output from $ vulcan build -v -s ffmpegthumbnailer-2.0.8 -d http://www.ffmpeg.org/releases/ffmpeg-1.2.tar.gz
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FFMPEG... no
configure: error: Package requirements (libavutil libavformat libavcodec >= 52.26.0 libswscale) were not met:
No package 'libavutil' found
No package 'libavformat' found
No package 'libavcodec' found
No package 'libswscale' found
TypeError: can't convert Symbol into Integer
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/transformation.rb:25:in `[]='
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/transformation.rb:25:in `block (2 levels) in nest_hash'
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/transformation.rb:23:in `each'
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/transformation.rb:23:in `each_with_index'
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/transformation.rb:23:in `block in nest_hash'
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/transformation.rb:20:in `each'
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/transformation.rb:20:in `nest_hash'
/Users/Jonas/.rvm/gems/ruby-1.9.3-p194@autouncle/gems/iye-1.0.0/lib/i18n_yaml_editor/store.rb:110:in `blo
module SnifferInterface
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def this_is_a_class_method
end
formats:
default: "%d.%m.%Y"
short: "%e. %b %Y"
long: "%e. %B %Y"
eng: "%Y-%m-%d"
with_week_day: "%a %d. %e. %B %Y"
weekday_without_year: "%A %d/%m"
day_only: "%A"
day_names:
class MyClass
def my_method(first_name, last_name)
# does something
end
end
MyClass.magic_method(:my_method) # => ["first_name", "last_name"]
# Inside EM::Connection 'receive_data(d)' loop
logger.debug "New price received"
extraction = proc {
logger.debug "Extracting price info"
extract_price_information(response) # Use libxml to match response with a schema and extract values
}
callback = proc { |price|
push_to_pusher(price) # Uses pusherapp to broadcast price
}
$ rake spec
(in /Users/Jonas/web_projects/auto_crawlers)
/Users/Jonas/.rvm/gems/ruby-1.9.2-p136/gems/nokogiri-1.4.4/lib/nokogiri/xml/node.rb:877: [BUG] unknown type 0x22 (0xc given)
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]
-- control frame ----------
c:0041 p:---- s:0152 b:0152 l:000151 d:000151 CFUNC :root
c:0040 p:0140 s:0149 b:0149 l:000148 d:000148 METHOD /Users/Jonas/.rvm/gems/ruby-1.9.2-p136/gems/nokogiri-1.4.4/lib/nokogiri/xml/node.rb:877
c:0039 p:0013 s:0141 b:0141 l:000140 d:000140 METHOD /Users/Jonas/.rvm/gems/ruby-1.9.2-p136/gems/nokogiri-1.4.4/lib/nokogiri/xml/node.rb:205
c:0038 p:0013 s:0133 b:0133 l:000132 d:000132 METHOD /Users/Jonas/.rvm/gems/ruby-1.9.2-p136/gems/nokogiri-1.4.4/lib/nokogiri/xml/node.rb:247