Skip to content

Instantly share code, notes, and snippets.

View ravicious's full-sized avatar

Rafał Cieślak ravicious

View GitHub Profile
@ravicious
ravicious / _info
Created August 21, 2009 16:32
deskBlip user CSS (thx to ^ludwik)
Autor designu: ^ludwik http://ludwik.org/blipapp-jest-jakis-chetny-developer/
Przeportował: ^ravicious
# Instalacja
- kliknij na przycisk `raw` przy panelu dla pliku `deskblip.css`
- skopiuj całą zawartość i przejdź do ustawień deskBlipa
- tam wklej skopiowaną zawartość i kliknij przycisk `Zapisz ustawienia`
# Podgląd

[ruby-dev:39421] exception from open-uri

Yusuke ENDOH writes:

Periodically when fetching web pages using open-uri, he notices that many different kinds of exceptions can be raised.

So far, he’s experienced these below:

  • Errno::ETIMEDOUT

⨀_⨀
⨂_⨂
(/◔ ◡ ◔)/
°ﺑ°
(¬_¬)
(´・ω・`)
(ʘ_ʘ)
(ʘ‿ʘ)
(ಠ_ಠ)
(ಠ‾ಠ)
@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')
[13:37][~]: sort ~/.bash_history | uniq -c | sort -rn | head
52 git status
26 rake spec
21 ./script/server
17 git pull origin master
15 rake
13 cd dev/fr
12 ls -la
12 exit
10 git push origin master
#RUBYISMS
# originally posted by Karmen Blake
# http://pastie.textmate.org/143799
# http://twitter.com/kblake http://blog.dudeblake.com/
a = b.foo
if a.empty?
a = b.bar
else
a.reverse!
# In your test_helper.rb
class ActiveRecord::Base
mattr_accessor :shared_connection
@@shared_connection = nil
def self.connection
@@shared_connection || retrieve_connection
end
end
# filename: config/locales/pl.rb
# taken from: http://github.com/svenfuchs/i18n/blob/4d8e2e3b8ce9841542cc3cf4d33b7a7702b2abc1/test/test_data/locales/plurals.rb
{:pl => { :i18n => { :plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) && ![22, 23, 24].include?(n % 100) ? :few : :other } } } } }
#!/usr/bin/env ruby
# encoding: UTF-8
#
# LearnRubyByExample:
#
# Ruby is a highly expressive programming language.
# Testing software is an expressive way to communicate how it works.
#
# In the middle of a night awake for allergy and insomnia, and some days after the 1st _why day,
# I've tried to combine Ruby and testing to help teaching ruby with some goals in mind:

Lista wtyczek:

  • AdBlock
  • Beautipedia Modified, Chromified
  • Delicious Tools
  • Facebook Photo Zoom
  • Feedly
  • FlashBlock
  • HTML5 Outliner
  • iReader