Skip to content

Instantly share code, notes, and snippets.

View RunsFor's full-sized avatar
🎯

Ilya Konyukhov RunsFor

🎯
View GitHub Profile
=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')
# ~/.ssh/config
Host *.kd.io
User runfor
IdentityFile ~/.ssh/runfor
ProxyCommand ssh %r@ssh.koding.com nc %h %p
$ ssh vm-0.runfor.koding.kd.io
Could not chdir to home directory /home/runfor: No such file or directory
The authenticity of host 'vm-0.runfor.koding.kd.io (<no hostip for proxy command>)' can't be established.
ECDSA key fingerprint is **********************.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'vm-0.runfor.koding.kd.io' (ECDSA) to the list of known hosts.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

its isn't core to RSpec. One the of the focuses of RSpec is on the documentation aspects of tests. Unfortunately, its often leads to documentation output that is essentially lies. Consider this spec:

User = Struct.new(:name, :email)

describe User do
  subject { User.new("bob") }
  its(:name) { should == "bob" }
end

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@RunsFor
RunsFor / outdated.txt
Created January 20, 2014 14:51
bundle outdated
Outdated gems included in the bundle:
* bootstrap-sass (3.0.3.0 > 2.3.2.2) Gemfile specifies "~> 2.2"
* capistrano (3.1.0 > 2.15.5) Gemfile specifies "~> 2.15.5"
* capybara (2.2.1 > 1.1.4) Gemfile specifies "~> 1.1.3"
* client_side_validations-simple_form (2.1.0 > 2.0.1)
* coffee-rails (4.0.1 > 3.2.2)
* cucumber (1.3.10 > 1.3.6) Gemfile specifies "= 1.3.6"
* devise (3.2.2 > 3.0.4) Gemfile specifies "~> 3.0.2"
* execjs (2.0.2 > 1.4.0) Gemfile specifies "~> 1.4.0"
* faraday (0.9.0 > 0.8.9)
@RunsFor
RunsFor / the_ruby_racer_install.sh
Created March 26, 2014 06:10
Install new version of therubyracer on mac os x
brew tap homebrew/dupes # Thanks Tom
brew install apple-gcc42
export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2
export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2
export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2
brew uninstall v8
gem uninstall libv8
@RunsFor
RunsFor / docker-logstash.conf
Last active August 29, 2015 14:10
logstash configuration for debugging
input { stdin { type => "stdin-type"} }
output { stdout { codec => rubydebug } }
[79] pry(main)> time = Time.zone.now
=> Thu, 12 Feb 2015 11:05:54 MSK +03:00
[80] pry(main)> time.to_f
=> 1423728354.07368
[81] pry(main)> user.update_attribute(:updated_at, time)
=> true
[82] pry(main)> user.updated_at.to_f
=> 1423728354.07368
[83] pry(main)> user.reload.updated_at.to_f
=> 1423728354.073