Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| # https://www.varnish-cache.org/docs/2.1/tutorial/vcl.html | |
| # https://www.varnish-cache.org/trac/wiki/VCLExamples | |
| # Summary | |
| # 1. Varnish will poll the backend at /health_check to make sure it is | |
| # healthy. If the backend goes down, varnish will server stale content | |
| # from the cache for up to 1 hour. | |
| # 2. Varnish will pass X-Forwarded-For headers through to the backend | |
| # 3. Varnish will remove cookies from urls that match static content file | |
| # extensions (jpg, gif, ...) |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| <?php | |
| /** | |
| * SplClassLoader implementation that implements the technical interoperability | |
| * standards for PHP 5.3 namespaces and class names. | |
| * | |
| * http://groups.google.com/group/php-standards/web/final-proposal | |
| * | |
| * // Example which loads classes for the Doctrine Common package in the | |
| * // Doctrine\Common namespace. |
| /*global console window describe xdescribe it expect runs waits*/ | |
| (function () { | |
| require.paths.unshift(__dirname + '/../../../'); | |
| require('thorny/base')('./config/default.json')(function ($) { | |
| describe('a vector2', function () { | |
| it('should contain the following functions', function () { | |
| var vector2 = $('thorny math vector2'); | |
| expect(typeof vector2.factory).toEqual('function'); | |
| expect(typeof vector2.centroid).toEqual('function'); |
| /// | |
| /// Simple pooling for Unity. | |
| /// Author: Martin "quill18" Glaude ([email protected]) | |
| /// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
| /// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
| /// UPDATES: | |
| /// 2015-04-16: Changed Pool to use a Stack generic. | |
| /// | |
| /// Usage: | |
| /// |
| upstream plex-upstream { | |
| # change plex-server.example.com:32400 to the hostname:port of your plex server. | |
| # this can be "localhost:32400", for instance, if Plex is running on the same server as nginx. | |
| server plex-server.example.com:32400; | |
| } | |
| server { | |
| listen 80; | |
| # server names for this server. |
| // Queue class for serializing AJAX calls. | |
| // | |
| // Inspired by Raynos http://stackoverflow.com/a/4797596/1194060 | |
| // | |
| // Queue has a public append method that expects some kind of task. | |
| // A task is a generic function passed as callback. | |
| // Constructor expects a handler which is a method that takes a ajax task | |
| // and a callback. Queue expects the handler to deal with the ajax and run | |
| // the callback when it's finished |
| /* | |
| * Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
| */ | |
| var http = require('http'), | |
| fs = require('fs'), | |
| util = require('util'); | |
| http.createServer(function (req, res) { | |
| var path = 'video.mp4'; |
| upstream project { | |
| server 22.22.22.2:3000; | |
| server 22.22.22.3:3000; | |
| server 22.22.22.5:3000; | |
| } | |
| server { | |
| listen 80; | |
| location / { |