Skip to content

Instantly share code, notes, and snippets.

View danwhitston's full-sized avatar

Daniel Whitston danwhitston

View GitHub Profile
@danwhitston
danwhitston / wsl_first_time_setup.sh
Last active May 7, 2022 13:34
Setting up my WSL environment - includes git & key, rbenv, rbenv ruby-build, attis, imagemagick, ruby, bundler, mysql, mongodb, redis
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade
ln -s "/mnt/c/Users/Daniel/Documents/homeflow" ~/homeflow
ln -s "/mnt/c/Users/Daniel/Documents" ~/documents
mkdir .ssh
cp documents/id* .ssh/
sudo chmod 600 .ssh/*
cd homeflow/attis
git pull
@danwhitston
danwhitston / browser_testing_on_wsl.md
Last active March 31, 2022 21:39
Browser testing for Ruby from within Windows Subsystem for Linux

This is a rough guide to setting up browser testing through Selenium on Windows Subsystem for Linux (WSL), aka Bash on Ubuntu on Windows. It assumes the following environment:

  • Windows 10, running WSL
  • A Ruby dev environment, running inside WSL
  • Code that we want to test using a web driver, in this case Selenium, with a Capybara and RSpec test framework

The coding project folders are stored in the main Windows filing hierarchy and accessed via dev/mnt, but that makes no real difference to development and testing other than making it possible to edit the code using a GUI based editor within Windows.

The problem with browser testing in WSL is that it relies on opening and controlling a web browser, and browsers don’t work on WSL at present as it deliberately doesn’t include X Windows or some other GUI manager - it’s meant to be command line after all. So while you can apt-get firefox, trying to actually run it isn’t going to work.

@danwhitston
danwhitston / keybase.md
Last active August 17, 2017 14:00
Keybase identity proof gist

Keybase proof

I hereby claim:

  • I am danwhitston on github.
  • I am danwhitston (https://keybase.io/danwhitston) on keybase.
  • I have a public key whose fingerprint is 4749 6D05 A187 CD88 FE47 C3DF AAD3 A7B4 52F7 2471

To claim this, I am signing this object: