https://mattbrictson.com/nginx-reverse-proxy-cache
https://www.nginx.com/resources/wiki/start/topics/examples/full/
# config/deploy.rb | |
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
require 'mina/rbenv' | |
set :rbenv_path, '/usr/local/rbenv' | |
set :domain, '<your_ip>' | |
set :deploy_to, '<your_deploy_path>' |
# /etc/nginx/sites-available/default | |
upstream symbolet { | |
server unix:/tmp/unicorn.<your_unicorn_sock>.sock fail_timeout=0; | |
} | |
server { | |
server_name symbolet.com www.symbolet.com; | |
listen 80; |
/** | |
* http://applemusic.tumblr.com/ | |
*/ | |
/** Ultra Light */ | |
@font-face { | |
font-family: "San Francisco"; | |
font-weight: 100; | |
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2"); | |
} |
#!/bin/bash | |
# | |
# Highligh Nginx config file in Vim | |
# Download syntax highlight | |
mkdir -p ~/.vim/syntax/ | |
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim | |
# Set location of Nginx config file | |
cat > ~/.vim/filetype.vim <<EOF |
/** | |
* Detects if WebGL is enabled. | |
* Inspired from http://www.browserleaks.com/webgl#howto-detect-webgl | |
* | |
* @return { number } -1 for not Supported, | |
* 0 for disabled | |
* 1 for enabled | |
*/ | |
function detectWebGL() | |
{ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>AWS Cognito + Facebook Login JavaScript Example</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.41.min.js"></script> | |
<script> | |
let hasBlobConstructor = typeof(Blob) !== 'undefined' && (function () { | |
try { | |
return Boolean(new Blob()); | |
} catch (e) { | |
return false; | |
} | |
}()); | |
let hasArrayBufferViewSupport = hasBlobConstructor && typeof(Uint8Array) !== 'undefined' && (function () { | |
try { |
user web; | |
# One worker process per CPU core. | |
worker_processes 8; | |
# Also set | |
# /etc/security/limits.conf | |
# web soft nofile 65535 | |
# web hard nofile 65535 | |
# /etc/default/nginx |