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
######################### | |
## SSL for dev ## | |
######################### | |
openssl genrsa -des3 -passout pass:x -out dev.mydomain.pass.key 2048 | |
openssl rsa -passin pass:x -in dev.mydomain.pass.key -out dev.mydomain.key | |
rm dev.mydomain.pass.key |
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
server { | |
listen 80; | |
listen 443 ssl; | |
server_name www.mydomain.com; | |
access_log /var/log/nginx/mydomain.access.log; | |
error_log /var/log/nginx/mydomain.error.log; | |
## SSL setting reference: | |
## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html |
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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
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
jhancock@air:~/phoenix$ MIX_ENV=docs mix run release_docs.exs | |
==> ex_doc | |
warning: the dependency ex_doc requires Elixir "~> 0.15.0" but you are running on v1.0.0 | |
Compiled lib/ex_doc/cli.ex | |
Compiled lib/ex_doc/markdown.ex | |
Compiled lib/ex_doc.ex | |
Compiled lib/ex_doc/markdown/earmark.ex | |
Compiled lib/ex_doc/markdown/hoedown.ex | |
Compiled lib/ex_doc/markdown/pandoc.ex |
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
mhd@lu:~$ tail /home/mhd/.rvm/log/ruby-1.9.1-p431/make.log | |
ossl_ssl.c:109:5: warning: (near initialization for ‘ossl_ssl_method_tab[10].func’) [enabled by default] | |
ossl_ssl.c:110:5: warning: initialization from incompatible pointer type [enabled by default] | |
ossl_ssl.c:110:5: warning: (near initialization for ‘ossl_ssl_method_tab[11].func’) [enabled by default] | |
ossl_ssl.c: In function ‘ossl_sslctx_session_remove_cb’: | |
ossl_ssl.c:407:38: warning: variable ‘ret_obj’ set but not used [-Wunused-but-set-variable] | |
ossl_ssl.c: In function ‘ossl_ssl_get_cipher’: | |
ossl_ssl.c:1223:12: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] | |
make[1]: *** [ossl_ssl.o] Error 1 | |
make[1]: Leaving directory `/home/mhd/.rvm/src/ruby-1.9.1-p431/ext/openssl' |
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
class Nginx < Thor | |
desc "start", "start nginx" | |
def start | |
`sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf` | |
end | |
desc "stop", "stop nginx" | |
def stop | |
nginx_pid_path = "/usr/local/nginx/logs/nginx.pid" | |
# `cat #{nginx_pid_path}` |
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
# encoding: utf-8 | |
require 'mongo' | |
host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost' | |
port = ENV['MONGO_RUBY_DRIVER_PORT'] || Mongo::Connection::DEFAULT_PORT | |
puts "Connecting to #{host}:#{port}" | |
db = Mongo::Connection.new(host, port).db('jon') | |
coll = db.collection('test') |
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 'rubygems' | |
require 'mongo' | |
host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost' | |
port = ENV['MONGO_RUBY_DRIVER_PORT'] || Mongo::Mongo::DEFAULT_PORT | |
puts "Connecting to #{host}:#{port}" | |
db = Mongo::Mongo.new(host, port).db('jon') | |
coll = db.collection('test') |
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 'rubygems' | |
require 'mongo' | |
require 'pp' | |
host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost' | |
port = ENV['MONGO_RUBY_DRIVER_PORT'] || XGen::Mongo::Driver::Mongo::DEFAULT_PORT | |
puts "Connecting to #{host}:#{port}" | |
db = XGen::Mongo::Driver::Mongo.new(host, port).db('blog_test') | |
articles = db.collection('articles') |
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 'rubygems' | |
require 'mongo' | |
host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost' | |
port = ENV['MONGO_RUBY_DRIVER_PORT'] || XGen::Mongo::Driver::Mongo::DEFAULT_PORT | |
puts "Connecting to #{host}:#{port}" | |
db = XGen::Mongo::Driver::Mongo.new(host, port).db('jon') | |
coll = db.collection('test') |
NewerOlder