NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
options:{ | |
style:'compressed' | |
}, | |
files: { | |
'css/style.css' : 'scss/style.scss' |
# Build file for lamp server | |
# To build: | |
# 1) Install docker (http://docker.io) | |
# 2) Build: sudo docker build -t chris/php-5.5 . | |
# 3) Run: sudo docker run -i -t -v /var/www:/var/www chris/php-5.5 /bin/bash | |
# with the -v you can add a mount in 0.7 you should be able to use -h to provide a static ip | |
FROM base:ubuntu-12.10 | |
MAINTAINER Chris de Kok <[email protected]> |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
/** | |
* An AngularJS directive for Dropzone.js, http://www.dropzonejs.com/ | |
* | |
* Usage: | |
* | |
* <div ng-app="app" ng-controller="SomeCtrl"> | |
* <button dropzone="dropzoneConfig"> | |
* Drag and drop files here or click to upload | |
* </button> | |
* </div> |
check process mysql | |
with pidfile /var/run/mysqld/mysqld.pid | |
start program = "/usr/sbin/service mysql start" with timeout 60 seconds | |
stop program = "/usr/sbin/service mysql stop" with timeout 60 seconds | |
if totalmem > 400 MB for 5 cycles then alert | |
if totalmem > 600 MB for 5 cycles then restart | |
if cpu > 50% for 5 cycles then alert | |
if cpu > 90% for 5 cycles then restart | |
if 3 restarts within 5 cycles then timeout |