$ git push heroku production:master
> -----> Heroku receiving push
> -----> PHP app detected
> -----> Bundling Apache v2.2.19
> -----> Bundling PHP v5.3.6
> -----> Discovering process types
> Procfile declares types -> (none)
/* | |
The MIT License (MIT) | |
Copyright (c) 2014 Ismael Celis | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
# Relevant example from our monitrc file. | |
check process couchdb with pidfile /usr/local/var/run/couchdb/couchdb.pid | |
start program = "/etc/init.d/couchdb start" | |
stop program = "/etc/init.d/couchdb stop" | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if memory usage > 70% MB for 5 cycles then restart |
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file, a complete list of statements and | |
## options please have a look in the monit manual. |
package pt.impresa.iweb.filters.request; | |
import java.io.IOException; | |
import java.text.Normalizer; | |
import java.util.Collections; | |
import java.util.Enumeration; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.regex.Pattern; |
<? | |
class AutoVersion { | |
public function fly($folder, $files_array = array(), $content_type = 'text/css', $compress = true) { | |
$code = ''; | |
$path = $_SERVER['DOCUMENT_ROOT'] . $folder; | |
$last_modified = $this->last_modified($folder, $files_array); | |
$max_age = 60 * 60 * 24 * 365; // refresh if older than a year |
From: http://www.redhat.com/magazine/022aug06/features/webserver | |
You can select automatic partitioning for your hard drive space, but it may not be ideal for this kind of deployment. Here is a suggested breakdown of your partitions, based on a computer with 1GB of RAM and a 160GB hard drive: | |
/boot 100MB | |
/ 10240MB | |
swap 2048MB (this should be twice the system memory) | |
/tmp 5120MB | |
/var 133120MB (this is where the majority of your web content will be stored) | |
/var/log 10240MB |
# CSS/JS auto-versioning | |
RewriteEngine On | |
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L] |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |