Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View zeelot's full-sized avatar

zeelot zeelot

  • Microsoft Research
  • Seattle
View GitHub Profile
@zeelot
zeelot / bla.php
Created August 21, 2011 18:03 — forked from kiall/bla.php
Valid::at_least()
<?php defined('SYSPATH') or die('No direct script access.');
class Model_Bla extends ORM {
public function rules()
{
return array(
'phone_one' => array(
array('at_least', array(':validation', 1, array('phone_one', 'phone_two', 'phone_three'))),
),
<?php defined('SYSPATH') or die('No direct script access.');
/**
*
*
* @package OAuth2
* @category Library
* @author Managed I.T.
* @copyright (c) 2011 Managed I.T.
*/
@zeelot
zeelot / miniond
Created July 27, 2011 01:25
miniond (for long running minion tasks)
#!/bin/bash
#
# This script is similar to minion but will do a few additional things:
# - PHP process is run in the background
# - PHP process is monitored and restarted if it exits for any reason
# - Added handlers for SUGHUP, SIGINT, and SIGTERM
#
# This is meant for long running minion tasks (like background workers).
# Shutting down the minion tasks is done by sending a SIGINT or SIGTERM signal
# to this miniond process. You can also restart the minion task by sending a
<?php defined('SYSPATH') or die('No direct script access.');
class TicketsCommentsStatusesLabels extends Doctrine_Migration_Base
{
public function up()
{
// Types
$int = array('type' => 'integer', 'length' => 8);
$varchar = array('type' => 'varchar', 'length' => 255);
$text = array('type' => 'text');