This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
// I was unhappy about there was close to no control over the "pageControl" | |
// in scrollableViews, so I hacked my own | |
// ----- | |
var pages = []; | |
var page; | |
var numberOfPages = 0; | |
// Configuration | |
var pageColor = "#c99ed5"; |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
# Filename-based cache busting | |
# taken from https://github.com/h5bp/html5-boilerplate/ | |
# This rewrites file names of the form `name.123456.js` to `name.js` | |
# so that the browser doesn't use the cached version when you have | |
# updated (but not manually renamed) the file. | |
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
RewriteEngine On |
{ | |
"patterns": [ | |
{ | |
"pattern": "(console\\.log\\(.*?\\))", | |
"scopes": [ | |
"storage.type.function.js", | |
"meta.function.json.js", | |
"source.js" | |
] | |
}, |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<!-- http://benalman.com/projects/jquery-urlinternal-plugin/ --> | |
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.ba-urlinternal.min.js'></script> | |
<!-- http://www.asual.com/jquery/address/ --> | |
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.address-1.3.min.js'></script> | |
<script> | |
// Original JavaScript by Chris Coyier | |
// Updated October 2010 by Stewart Heckenberg & Chris Coyier |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk. This process is also explained at the Nginx ngx_http_fastcgi_module page document page.
Since disk is slow and memory is fast the aim is to get as many FastCGI responses passing through memory only. On the flip side we don't want to set an excessively large buffer as they are created and sized on a per request basis (i.e. it's not shared memory).
The related Nginx options are:
fastcgi_buffering
appeared in Nginx 1.5.6 (1.6.0 stable) and can be used to turn buffering completely on/off. It's on by default.fastcgi_buffer_size
](http://nginx.org/en/