Skip to content

Instantly share code, notes, and snippets.

[example.org]
listen = /srv/vhtdocs/example.org/log/.php-fpm.sock
listen.owner = example_org
listen.group = www-data
listen.mode = 0660
user = example_org
group = example_org
pm = dynamic
@jinnko
jinnko / collectd-smartmon.sh
Last active August 15, 2018 00:22
SMART script for collectd. Forked from original at http://devel.dob.sk/collectd-scripts/smartmon.sh
#!/bin/dash
###
# ABOUT : collectd monitoring script for smartmontools (using smartctl)
# AUTHOR : Samuel B. <samuel_._behan_(at)_dob_._sk> (c) 2012
# LICENSE: GNU GPL v3
# SOURCE: http://devel.dob.sk/collectd-scripts/
#
# This script monitors SMART pre-fail attributes of disk drives using smartmon tools.
# Generates output suitable for Exec plugin of collectd.
###
@jinnko
jinnko / mdadm-fastsync
Created August 12, 2013 10:58
Set disk values to maximize a resync, or restore the default settings. Dynamically detects the underlying volumes that make up the MD device. Based on the fine advice from Vivek Gite posted at http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html.
#!/bin/zsh
#
# @author Jinn Ko <https://gist.github.com/jinnko>
# @since 2013-08-11
MD_DEV=$1
ACTION=$2
MIN_SPEED=50000
MAX_SPEED=200000
@jinnko
jinnko / hiphop-php chef recipe.rb
Last active December 14, 2015 05:59
Opscode Chef recipe to build hiphop-php from source on Debian 6.
#
# Cookbook Name:: php-hiphop
# Recipe:: install_from_source
#
# Copyright 2011, FiveCool Consulting Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#