Skip to content

Instantly share code, notes, and snippets.

@turadg
turadg / bluetooth-swap.sh
Last active Dec 22, 2015 — 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/
View bluetooth-swap.sh
#!/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 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)
# 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 Aug 9, 2018 — forked from sferik/install-ruby-2.0.0.sh
Install Ruby 2.0 with Readline and latest OpenSSL
View install-ruby-2.0.0.sh
#!/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.