This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyApp\Model; | |
use Illuminate\Database\Eloquent\Model as EloquentModel; | |
use Illuminate\Support\Str; | |
/** | |
* Class CamelModel. | |
* | |
* @mixin \Illuminate\Database\Eloquent\Builder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var im = require('imagemagick'); | |
var aws = require('aws-sdk'); | |
var s3 = new aws.S3({ apiVersion: '2006-03-01' }); | |
exports.handler = function(event, context) { | |
var bucket = event.Records[0].s3.bucket.name; | |
var key = decodeURIComponent(event.Records[0].s3.object.key.replace(/\+/g, ' ')); | |
var params = { | |
Bucket: bucket, | |
Key: key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return request.headers['x-forwarded-for'] | |
? request.headers['x-forwarded-for'] | |
: (request.connection && request.connection.remoteAddress) | |
? request.connection.remoteAddress | |
: (request.connection.socket && request.connection.socket.remoteAddress) | |
? request.connection.socket.remoteAddress | |
: (request.socket && request.socket.remoteAddress) | |
? request.socket.remoteAddress | |
: '0.0.0.0'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* required jQuery | |
*/ | |
;(function($){ | |
/* jQuery plugin template */ | |
var plugname = "your_plugin_name"; | |
$.fn[plugname] = function(method) { | |
if ( methods[method] ) { | |
return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); | |
} else if ( typeof method === 'object' || ! method ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Download | |
* http://mike.teczno.com/JSON/JSON.phps | |
*/ | |
require_once(dirname(__FILE__) . "/JSON.php"); | |
if(!function_exists("json_encode")) { | |
function json_encode($values) { | |
$obj = new Services_JSON(); | |
return $obj->encode($values); |