Skip to content

Instantly share code, notes, and snippets.

@turadg
turadg / bluetooth-swap.sh
Last active December 22, 2015 20:59 — forked from hughsaunders/release_bt_keyboard.sh
Script to swap your Bluetooth devices connections between two Macs. Works great with iMacMonitor.app to quickly switch your iMac between being a laptop monitor or full computer. http://bogner.sh/2013/07/os-x-how-to-use-an-imac-as-monitor/
#!/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
REMOTE=Stone.local
@turadg
turadg / subdomains.rb
Last active January 21, 2024 19:45 — forked from rtekie/subdomains.rb
Drop-in utility to test your app subdomains with Capybara, Rspec, and a Javascript driver (Poltergeist, Webkit, or Selenium)
# 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)
# lvh.me always resolves to 127.0.0.1
hostname = subdomain ? "#{subdomain}.lvh.me" : "lvh.me"
Capybara.app_host = "http://#{hostname}"
end
@turadg
turadg / install-ruby-2.0.0.sh
Last active August 9, 2018 06:58 — forked from sferik/install-ruby-2.0.0.sh
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