Comparing ES7 and core.async
ES7 | core.async |
---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
ES7 | core.async |
---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
# Note (November 2016): | |
# This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information | |
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name yourserver.com; | |
root /path/to/your/htdocs; |
require 'openssl' | |
require 'socket' | |
ssl_context = OpenSSL::SSL::SSLContext.new | |
ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
ssl_context.cert_store = OpenSSL::X509::Store.new | |
ssl_context.cert_store.set_default_paths if File.exists? OpenSSL::Config::DEFAULT_CONFIG_FILE | |
socket = TCPSocket.new('api.gb1.brightbox.com', 443) | |
ssl_socket = OpenSSL::SSL::SSLSocket.new(socket, ssl_context) |
Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).
Other application notes:
Salient points for each file:
$VERBOSE = nil | |
require File.expand_path('../rooby', __FILE__) | |
Person = Rooby::Class.new 'Person' do | |
define :initialize do |name| | |
@name = name | |
end | |
define :name do |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
h3. Backends
"i18n_backend_database":http://github.com/dylanz/i18n_backend_database
Database Backend for Rails I18n
h3. UIs
"i18n_db_admin":http://github.com/yar/i18n_db_admin
Demo application including admin interface for Rails translations using i18n_db
include Rails.application.routes.url_helpers | |
default_url_options[:host] = "localhost" |
require 'rubygems' | |
require 'sinatra/base' | |
class Bar < Sinatra::Base | |
set :static, true | |
set :public, File.join(File.dirname(__FILE__), 'bar/_site/') | |
get '' do |
### IMPORTANT NOTE: See the comment thread below for a more concise way to determine this now, using has_css... | |
#A better 'I should not see' for Capybara that lets jQuery determine visibility of the text you're looking for. | |
Then /^"([^\"]*)" should not be visible$/ do |text| | |
finder_script = %{ | |
function is_text_visible_on_page(text) { | |
var match = false; | |
$('*:visible') |