Skip to content

Instantly share code, notes, and snippets.

View vishvish's full-sized avatar
:octocat:
Busy being an antifascist

Vish vishvish

:octocat:
Busy being an antifascist
View GitHub Profile
config_files = Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf")
config_files.each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.read(file).each do |line|
line.strip!
=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')
@vishvish
vishvish / gist:5722132
Last active December 18, 2015 03:59 — forked from nbibler/gist:5307941
.powrc for projects that works with RVM
if [ -f "$rvm_path/scripts/rvm" ]; then
source "$rvm_path/scripts/rvm"
if [ -f ".rvmrc" ]; then
source ".rvmrc"
fi
if [ -f ".ruby-version" ]; then
rvm use `cat .ruby-version`
fi