Skip to content

Instantly share code, notes, and snippets.

View assembler's full-sized avatar

Milovan Zogovic assembler

  • metoda GmbH
  • Munich, Germany
  • 18:34 (UTC +02:00)
View GitHub Profile
@assembler
assembler / youtube.search.list.rb
Created January 16, 2013 07:56
youtube.search.list (v3 api)
require 'google/api_client'
client = Google::APIClient.new(application_name: 'Bent Pixels', application_version: '1.0')
client.key = 'XXX'
youtube = client.discovered_api('youtube', 'v3')
puts "-------- getting latest videos --------"
i = 1
@assembler
assembler / gist:4545377
Created January 16, 2013 07:53
youtube.search.list ordered by date
0002. [2013-01-16 06:50:19 UTC] [yT_slrx5TWI] Sapna in full Action - Heroine No.1 Scene
0003. [2013-01-16 06:43:28 UTC] [LBytWlIB4Pw] Aaja Mere Raja Mujhe Pyaar Kar le, Sapna, Heroine No.1 Song
0004. [2013-01-16 06:42:34 UTC] [6OEXzKk5gkQ] Tomo Ohira Teaches Old School Street Fighter 2 Techniques: Timing, Distance, & Reaction
0005. [2013-01-16 06:29:05 UTC] [U-GAXSYQn9Y] Cover Girl - Budget Barbie: EP50
0006. [2013-01-16 06:28:32 UTC] [svIOlreUr-A] Deewana Hoon Sanam, Heroine No.1 Romantic Song
0007. [2013-01-16 06:16:22 UTC] [XKOpwocGuNw] Actress molested by Producers, Heroine No.1 Scene
0008. [2013-01-16 06:07:33 UTC] [5z0u82668eA] Sapna's first day at Shoot, Heroine No.1 Scene
0009. [2013-01-16 05:54:41 UTC] [9oR19oa4W9o] Sapna gets offer for Film, Heroine No. 1 Scene
0010. [2013-01-16 05:22:25 UTC] [xZejVRkkkIE] sexy pole dance
0011. [2013-01-16 05:16:58 UTC] [BqQvjos9O4w] Mandy Moore - Only Hope Cover
@assembler
assembler / gist:3339574
Created August 13, 2012 11:08
raw request
------------XnJLe9ZIbbGUYtzPQJ16u1
Content-Disposition: form-data; name="note[body]"
Voila
------------XnJLe9ZIbbGUYtzPQJ16u1
Content-Disposition: form-data; name="note[photo_file]"; filename="image.jpg"
Content-Type: image/jpeg
Content-Length: 1293
????JFIFHH??>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
@assembler
assembler / notes_spec.rb
Created August 13, 2012 11:05
with attachment
context 'with attachment' do
let(:file) {
Rack::Test::UploadedFile.new(Rails.root.join('spec/support/image.jpg'), 'image/jpeg')
}
let(:cloudinary_response) {
{ public_id: "rqdrdaexlgjy5j1hoabig", version: 1338884873, format: 'jpg', resource_type: 'image' }
}
before do
@assembler
assembler / gist:3097611
Created July 12, 2012 11:34
Gemfile.lock
GIT
remote: git://github.com/assembler/rails-erd.git
revision: 53e01cf74f6f051bcdb283847d145ef84ce19dc4
specs:
rails-erd (0.5.0pre)
activerecord (~> 3.0)
activesupport (~> 3.0)
choice (~> 0.1.4)
ruby-graphviz (~> 1.0)
@assembler
assembler / trace
Created April 23, 2012 12:00
undefined method `identifier' for nil:NilClass
newrelic_rpm (3.3.4) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:166:in `render_with_newrelic'
actionpack (3.2.3) lib/action_view/renderer/renderer.rb:41:in `render_partial'
actionpack (3.2.3) lib/action_view/helpers/rendering_helper.rb:27:in `render'
app/views/notifications/index.html.erb:10:in `block in _app_views_notifications_index_html_erb___3212508411209234601_70332619008280'
actionpack (3.2.3) lib/action_view/helpers/cache_helper.rb:53:in `fragment_for'
actionpack (3.2.3) lib/action_view/helpers/cache_helper.rb:36:in `cache'
app/views/notifications/index.html.erb:8:in `_app_views_notifications_index_html_erb___3212508411209234601_70332619008280'
actionpack (3.2.3) lib/action_view/template.rb:143:in `block in render'
activesupport (3.2.3) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.3) lib/action_view/template.rb:141:in `render'
@assembler
assembler / Gemfile.lock
Created April 23, 2012 12:01
Gemfile.lock
GIT
remote: git://github.com/assembler/rails-erd.git
revision: 53e01cf74f6f051bcdb283847d145ef84ce19dc4
specs:
rails-erd (0.5.0pre)
activerecord (~> 3.0)
activesupport (~> 3.0)
choice (~> 0.1.4)
ruby-graphviz (~> 1.0)
default_settings: &default_settings
# whether to override image_tag helper with cl_image_tag
enhance_image_tag: false
# ...
static_image_support: false
development:
<<: *default_settings
cloud_name: "xxx"
@assembler
assembler / gist:2367018
Created April 12, 2012 12:51
Gemfile.lock
GIT
remote: git://github.com/assembler/rails-erd.git
revision: 53e01cf74f6f051bcdb283847d145ef84ce19dc4
specs:
rails-erd (0.5.0pre)
activerecord (~> 3.0)
activesupport (~> 3.0)
choice (~> 0.1.4)
ruby-graphviz (~> 1.0)
@assembler
assembler / simple_form.rb
Created March 30, 2012 09:24
defining default form options in simple_form
module SimpleForm::ActionViewExtensions::FormHelper
def simple_form_for_with_defaults(record, options={}, &block)
# define defaults here
simple_form_for_without_defaults(record, options, &block)
end
alias_method_chain :simple_form_for, :defaults
end