This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A pure ruby implementation of the sd-daemon library distributed with SystemD. | |
# | |
# Includes: | |
# * File descriptor passing for socket-based activation | |
# * Daemon ready notifications | |
# | |
# Missing: | |
# * Watchdog notifications | |
# * Support for logging with log levels on stderr | |
# * Detection of systemd boots |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
# Based on https://github.com/rails/ssl_requirement/blob/master/lib/ssl_requirement.rb | |
class SslRequirement | |
def initialize(app, options= {}) | |
@app = app | |
@allowed = options[:allowed] | |
@required = options[:required] | |
end | |