Skip to content

Instantly share code, notes, and snippets.

@jordanyeo
jordanyeo / README.md
Last active April 22, 2020 01:09 — forked from MarMed/README.md
Routing plex traffic through an SSH tunnel

#Routing plex traffic through an SSH tunnel

This guide creates a reverse SSH tunnel to route all Plex server traffic through it.

Step 2 is done on the tunnel, all other steps are done on the plex server.

#1. Setup SSH keys (if you already have key based authenthication setup skip to step 2)

On plex server:

@jordanyeo
jordanyeo / Rakefile
Created November 26, 2009 21:32 — forked from kylefox/Rakefile
# From http://lojic.com/blog/2009/02/26/setup-shoulda-and-rcov-for-rails-222/
namespace :test do
desc 'Measures test coverage'
task :coverage do
rm_f "coverage"
rm_f "coverage.data"
rcov = "rcov -Itest --rails --aggregate coverage.data -x \" rubygems/*,/Library/Ruby/Site/*,gems/*,rcov*\""
system("#{rcov} test/unit/*_test.rb")
system("#{rcov} test/functional/admin/*_test.rb")
system("#{rcov} --html test/integration/admin/*_test.rb")
module Harmony
# Allows accessing config variables from harmony.yml like so:
# Harmony[:domain] => harmonyapp.com
def self.[](key)
unless @config
raw_config = File.read(RAILS_ROOT + "/config/harmony.yml")
@config = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
end
@config[key]
end