We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.
apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
// an IIFE that illustrates different implementations | |
// of $.post() with Promises | |
// | |
// Check out jsFiddle `jQuery and Promises with UI animation` | |
// - demonstrates $.Deferrred() and custom $.when() | |
// - @ http://jsfiddle.net/ThomasBurleson/RTLr6/179/ | |
// | |
var onSubmitFeedback = (function () { | |
var target = $("#container").append("<div class='spinner'>"); |
" Show highlighting groups for current word | |
nmap <c-g> :call <SID>SynStack()<CR> | |
function! <SID>SynStack() | |
if !exists("*synstack") | |
return | |
endif | |
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') | |
endfunc |
to get a list of free programming books, here's the list from a Zed Shaw & Co. programming-related, profanity-filled website. | |
<div style="text-align: left"> | |
<table> | |
<tbody><tr><th colspan="3">Programming Languages</th> | |
</tr><tr> | |
<td><a href="#Assembly Language">Assembly Language</a></td> | |
<td><a href="#Bash">Bash</a></td> | |
<td><a href="#C / C++">C / C++</a></td> | |
</tr> |
<?php | |
class ExampleTest extends TestCase { | |
public function setUp() | |
{ | |
parent::setUp(); | |
DB::beginTransaction(); | |
} |
ec2-1-2-3-4.compute-1.amazonaws.com new_hostname=new-hostname.example.com | |
ec2-5-6-7-8.compute-1.amazonaws.com |
# nginx Configuration File | |
# http://wiki.nginx.org/Configuration | |
# Run as a less privileged user for security reasons. | |
user nginx nginx; | |
# How many worker threads to run; | |
# "auto" sets it to the number of CPU cores available in the system, and | |
# offers the best performance. Don't set it higher than the number of CPU | |
# cores if changing this parameter. |
var AWS = require('aws-sdk'); | |
var http = require('http'); | |
var httpProxy = require('http-proxy'); | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var stream = require('stream'); | |
if (process.argv.length != 3) { | |
console.error('usage: aws-es-proxy <my-cluster-endpoint>'); | |
process.exit(1); |
for (var i = 0; i < 1024 * 1024; i++) { | |
process.nextTick(function () { Math.sqrt(i) } ) | |
} |
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 outlined at the Nginx ngx_http_fastcgi_module page manual page.