Skip to content

Instantly share code, notes, and snippets.

@tschaub
tschaub / _.md
Last active April 5, 2025 18:24
TopoJSON Time Zones

TopoJSON Time Zones

The result is this 181 KB timezones.json (36 KB with gzip)

@jsanz
jsanz / README.md
Last active April 9, 2025 13:51
Look up table for the Köppen-Geiger
@kevinSuttle
kevinSuttle / meta-tags.md
Last active April 9, 2025 13:51 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@chrisbloom7
chrisbloom7 / 01-validates-file-size-carrierwave.md
Last active November 18, 2024 16:56
A cheap knock off of the default validates_length_of validator, but checks the filesize of a Carrierwave attachment

Note that this validation runs both after the file is uploaded and after CarrierWave has processed the image. If your base uploader includes a filter to resize the image then the validation will be run against the resized image, not the original one that was uploaded. If this causes a problem for you, then you should avoid using a resizing filter on the base uploader and put any specific size requirements in a version instead.

So instead of this:

require 'carrierwave/processing/mini_magick'

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')