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
@items = MyModel.all | |
@columns = MyModel.column_names | |
respond_to do |format| | |
format.csv do | |
my_csv = FasterCSV.generate do |csv| | |
# header row | |
csv << @columns | |
# data rows |
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
# Download all images from a stock exchange lightbox | |
require 'rubygems' | |
require 'mechanize' | |
require 'logger' | |
agent = Mechanize.new { |a| a.log = Logger.new("mech.log") } | |
agent.user_agent_alias = 'Mac Safari' | |
page = agent.get("http://www.sxc.hu/") |
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
// Global reset rules. | |
// For more specific resets, use the reset mixins provided below | |
=global-reset | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, font, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, |
NewerOlder