Skip to content

Instantly share code, notes, and snippets.

View kylefarris's full-sized avatar
💭
I may be slow to respond.

Kyle Farris kylefarris

💭
I may be slow to respond.
View GitHub Profile
// ****************************************************************************
// This code is designed to allow your ExpressJS app to stream uploads through
// clamav and on to S3 will full error-handling.
// -----
// You're going to need the following NPM modules installed for this to work:
// - uuid
// - busboy
// - aws-sdk
// - s3-upload-stream
// - express
/***********************************************************
******* SIMPLE TEST **/
class A {
function t() {
echo get_calling_class();
}
}
class B {
@kylefarris
kylefarris / CI_Date.php
Created August 26, 2011 14:10
Codeigniter Date Library
<?php
class CI_Date {
public $sec_in_min, $min_in_hour, $hr_in_day, $day_in_wk, $sec_in_wk, $sec_in_day, $min_in_wk, $min_in_day, $hr_in_wk;
public function __construct() {
$this->sec_in_min = 60;
$this->min_in_hr = 60;
$this->hr_in_day = 24;
$this->day_in_wk = 7;
$this->day_in_yr = 365;
$this->sec_in_hr = $this->sec_in_min * $this->min_in_hr;