For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| gem 'cramp' | |
| gem 'erubis', '2.6.5' | |
| gem 'usher', "0.6.0" |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs | |
| # Required-Stop: $local_fs $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: S 0 1 6 |
| # put this file in spec/javascripts/support directory | |
| require 'barista' | |
| require 'logger' | |
| require File.join(Rails.root, 'config/initializers/barista_config') | |
| Barista.configure do |c| | |
| c.env = 'test' | |
| c.logger = Logger.new(STDOUT) | |
| c.logger.level = Logger::INFO |
| --Proposed solutions to problems 87,88 and 89 of "99 Haskell Problems" | |
| --Not optimal but they work | |
| --If you know haskell and want to solve some problems there are some missing at: | |
| --http://www.haskell.org/haskellwiki/99_questions/80_to_89 | |
| import Data.List | |
| type Node = Int | |
| type Edge = (Node,Node) | |
| type Graph = ([Node],[Edge]) |
| MKMapRect zoomRect = MKMapRectNull; | |
| for (id <MKAnnotation> annotation in mapView.annotations) { | |
| MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate); | |
| MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0); | |
| if (MKMapRectIsNull(zoomRect)) { | |
| zoomRect = pointRect; | |
| } else { | |
| zoomRect = MKMapRectUnion(zoomRect, pointRect); | |
| } | |
| } |
| task 'db:test:prepare' => :close_postgres_connections | |
| task :close_postgres_connections => :environment do | |
| #Kill any other open connections on the test db | |
| db_adapter = defined?(::ActiveRecord::Base) ? ActiveRecord::Base.connection : nil | |
| db_adapter ||= defined?(::Sequel::Model) ? ::Sequel::Model.db : nil | |
| if Rails.env.test? && db_adapter | |
| db_config = Rails.configuration.database_configuration[Rails.env].symbolize_keys | |
| begin |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # SELENIUM_SERVER is the IP address or hostname of the system running Selenium | |
| # Server, this is used to determine where to connect to when using one of the | |
| # selenium_remote_* drivers | |
| SELENIUM_SERVER = "10.10.11.1" | |
| # SELENIUM_APP_HOST is the IP address or hostname of this system (where the | |
| # tests run against) as reachable for the SELENIUM_SERVER. This is used to set | |
| # the Capybara.app_host when using one of the selenium_remote_* drivers | |
| SELENIUM_APP_HOST = "10.10.11.2" |