Skip to content

Instantly share code, notes, and snippets.

turadg /
Last active Dec 22, 2015 — forked from hughsaunders/
Script to swap your Bluetooth devices connections between two Macs. Works great with to quickly switch your iMac between being a laptop monitor or full computer.
#!/usr/bin/env bash
# This script works after you've paired the Bluetooth devices with
# both the local and remote computer. Turning one off and the other on
# forces the devices to reconnect with the only computer that has BT on.
# Look up local SSH hosts with Bonjour using `dns-sd -B _ssh`
# You may want to set up an SSH keypair to log in without typing a password
turadg / subdomains.rb
Last active Oct 12, 2020 — forked from rtekie/subdomains.rb
Drop-in utility to test your app subdomains with Capybara, Rspec, and a Javascript driver (Poltergeist, Webkit, or Selenium)
View subdomains.rb
# Support for Rspec / Capybara subdomain integration testing
# Make sure this file is required by spec_helper.rb
# (e.g. save as spec/support/subdomains.rb)
def switch_to_subdomain(subdomain)
# always resolves to
hostname = subdomain ? "#{subdomain}" : ""
Capybara.app_host = "http://#{hostname}"
turadg /
Last active Aug 9, 2018 — forked from sferik/
Install Ruby 2.0 with Readline and latest OpenSSL
#!/usr/bin/env sh
brew update
# upgrade any that were already installed
brew upgrade rbenv ruby-build readline openssl
# install what's missing
brew install rbenv ruby-build readline openssl
You can’t perform that action at this time.