(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
sub vcl_hit { | |
if (obj.ttl >= 0s) { | |
# normal hit | |
return (deliver); | |
} | |
# We have no fresh fish. Lets look at the stale ones. | |
if (std.healthy(req.backend_hint)) { | |
# Backend is healthy. Limit age to 10s. | |
if (obj.ttl + 10s > 0s) { | |
set req.http.grace = "normal(limited)"; |
# Remove this for Arel v7.0 | |
module Arel | |
module Nodes | |
class Case < Arel::Nodes::Node | |
include Arel::OrderPredications | |
include Arel::Predications | |
include Arel::AliasPredication | |
attr_accessor :case, :conditions, :default |
# Extremely basic development setup to serve the current directory at http://localhost:9001 | |
# Start nginx in this directory with `nginx -p . -c nginx.conf` | |
# Stop nginx with `nginx -p . -s stop` | |
events {} | |
http { | |
# Serve files with correct mimetypes on OSX | |
# location may have to be adjusted depending on your OS and nginx install | |
include /usr/local/etc/nginx/mime.types; |
# Compresses all .js and .css files under the assets path. | |
namespace :deploy do | |
# It is important that we execute this after :normalize_assets because | |
# ngx_http_gzip_static_module recommends that compressed and uncompressed | |
# variants have the same mtime. Note that gzip(1) sets the mtime of the | |
# compressed file after the original one automatically. | |
after :normalize_assets, :gzip_assets do | |
on release_roles(fetch(:assets_roles)) do | |
assets_path = release_path.join('public', fetch(:assets_prefix)) | |
within assets_path do |
/* compile with: | |
* | |
* gcc -g -Wall composite2.c `pkg-config vips --cflags --libs` | |
*/ | |
#include <stdio.h> | |
#include <vips/vips.h> | |
/* Composite images a and b. | |
*/ |
### Generated automatically from Makefile.org by Configure. | |
## | |
## Makefile for OpenSSL | |
## | |
VERSION=1.0.2 | |
MAJOR=1 | |
MINOR=0.2 | |
SHLIB_VERSION_NUMBER=1.0.0 |
ssh [email protected] "bash -s -x" -- <ixgbevf-upgrade.sh |
location ~* ^/s3/(.*) { | |
set $bucket '<REPLACE WITH YOUR S3 BUCKET NAME>'; | |
set $aws_access '<REPLACE WITH YOUR AWS ACCESS KEY>'; | |
set $aws_secret '<REPLACE WITH YOUR AWS SECRET KEY>'; | |
set $url_full "$1"; | |
set_by_lua $now "return ngx.cookie_time(ngx.time())"; | |
set $string_to_sign "$request_method\n\n\n\nx-amz-date:${now}\n/$bucket/$url_full"; | |
set_hmac_sha1 $aws_signature $aws_secret $string_to_sign; | |
set_encode_base64 $aws_signature $aws_signature; |
DELIMITER $$ | |
CREATE FUNCTION base58_encode (num bigint(64)) RETURNS varchar(255) | |
DETERMINISTIC | |
BEGIN | |
DECLARE alphabet varchar(255); | |
DECLARE base_count int DEFAULT 0; | |
DECLARE encoded varchar(255); | |
DECLARE divisor DECIMAL(10,4); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.