Skip to content

Instantly share code, notes, and snippets.

View skorfmann's full-sized avatar

Sebastian Korfmann skorfmann

View GitHub Profile
require 'rubygems'
require 'faster_csv'
require 'net/http'
require 'open-uri'
class String
require 'iconv' #this line is not needed in rails !
def to_utf8
Iconv.conv('utf-8','ISO-8859-1', self)
end
@skorfmann
skorfmann / gist:1189736
Created September 2, 2011 20:05 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Web-Engineering (Ruby on Rails, Freelancer)
Favorite Python project: Django
Favorite Conference: euruko
Python Experience Level: few test-drives
<h1>Your Pragmatic Catalog </h1>
<% @products.each do |product| %>
<div class="entry">
<%= link_to image_tag(product.image_url) , line_items_path(:product_id => product.id) ,
:method => :post %>
<h3><%= product.title %></h3>
<%=raw product.description %>
require 'rubygems'
IRB.conf[:AUTO_INDENT] = false
IRB.conf[:USE_READLINE] = true
class Object
# easy way to list an object's methods without clutter
def local_methods
(methods - Object.instance_methods).sort
end
end