Skip to content

Instantly share code, notes, and snippets.

View askn's full-sized avatar
🤔
[object Function]

Aşkın Gedik askn

🤔
[object Function]
View GitHub Profile
@smazhara
smazhara / gist:4740692
Last active May 16, 2021 19:55
Ruby AES128 encrypt-decrypt example
require "openssl"
require "base64"
include Base64
@vigo
vigo / ruby-tips.md
Created November 4, 2012 22:50
Ruby Tips

Ruby Tips

Genel

  • Herşey bir Object (Nesne)
  • Her Object BasicObjectden türemiş. (Objective-C NSObject gibi...)
  • Object.methods ile o nesneye ait tüm method'lar
  • Object.methods.inspect string olarak method'lar
  • Mutlaka bir şey geriye döner. Hiçbir şey dönmese nil döner.

Style Guide

@paracycle
paracycle / rails_admin.tr.yml
Created June 7, 2012 13:57
Rails Admin Turkish translation
tr:
admin:
home:
name: "Anasayfa"
pagination:
previous: "« Önceki"
next: "Sonraki »"
truncate: "…"
misc:
filter_date_format: "dd/mm/yy" # a combination of 'dd', 'mm' and 'yy' with any delimiter. No other interpolation will be done!
@myronmarston
myronmarston / ways_to_use_vcr.rb
Created April 13, 2012 15:00
Ways to use VCR for a request made by a let block
# 1) Use VCR.use_cassette in your let block. This will use
# the cassette just for requests made by creating bar, not
# for anything else in your test.
let(:foo) { VCR.use_cassette("foo") { create(:bar) } }
it "uses foo" do
foo
end
# 2) Wrap the it block that uses #foo in VCR.use_cassette.
@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@rstacruz
rstacruz / index.md
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@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')