// jQuery
$(document).ready(function() {
// code
})| class SaferProxyFix(object): | |
| """This middleware can be applied to add HTTP proxy support to an | |
| application that was not designed with HTTP proxies in mind. It | |
| sets `REMOTE_ADDR`, `HTTP_HOST` from `X-Forwarded` headers. | |
| If you have more than one proxy server in front of your app, set | |
| num_proxy_servers accordingly | |
| Do not use this middleware in non-proxy setups for security reasons. | |
| ffmpeg -i input.mp3 -acodec pcm_s16le -ac 1 -ar 16000 output.wav | |
| # To convert all mp3 files in a directory in Linux: | |
| for f in *.mp3; do ffmpeg -i "$f" -acodec pcm_s16le -ac 1 -ar 16000 "${f%.mp3}.wav"; done | |
| # Or Windows: | |
| for /r %i in (*) do ffmpeg -i %i -acodec pcm_s16le -ac 1 -ar 16000 %i.wav |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
#Tutorial for setting up memcache on OSX and MAMP 2.0
##Prerequisites
- Load [this tutorial] (http://www.larsdesigns.net/content/how-setup-and-configure-memcache-mamp-version-2-osx-lion) for reference
- Install Xcode developer tools
- Install PECL
- Assumptions #1 - You are using PHP 5.3.6 but this tutorial should work with other versions and you understand you are recompiling php to get memcache working.
##Step 1 - Configure PECL
| <IfModule mod_headers.c> | |
| Header set Connection keep-alive | |
| # Cache-control headers | |
| # 2 HOURS | |
| #<filesMatch "*"> | |
| Header set Cache-Control "max-age=7200, must-revalidate" | |
| #</filesMatch> | |
| # 480 weeks - 290304000 |
- [RFR] - Code refectoring
- [WIP] - Work in progress
- [FIX] - Bug fix
- [FTR] - New feature
- [SCR] - Security issue fix
- [CLP] - Changes that do not alter functionality, but improve code style and readability.
- [CRO] - Content Rate Optimization
- [TST] - Add test suite for slider component
My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.
My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion.
I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.
This is a quick guide for installing memcached on a Mac with Homebrew, and starting and stopping it with Lunchy. I hope this tutorial will get your memcached up and running in no time.
Installing Homebrew is super easy. Just paste this in your terminal —
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"