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 | |
$thumb = new \Imagick(); | |
$thumb->readimageblob($imagedata['data']); | |
$thumb->cropThumbnailImage($d->getWidth(), $d->getHeight()); | |
$output = $thumb->getimageblob(); |
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 | |
$gdthumb = new \PHPThumb\GD($imagedata['data']); | |
$gdthumb->setOptions(array( | |
'interlace' => false | |
)); | |
$gdthumb->adaptiveResizeQuadrant($d->getWidth(), $d->getHeight()); | |
$output = $gdthumb->getImageAsString(); |
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
/** | |
* Used to debug locally node.js files | |
* | |
* Usage: | |
* | |
* node debug.js function_to_run.js event_file.json | |
* | |
* Make sure that you have dotenv in package json for environment support. | |
*/ | |
require('dotenv').config(); |
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
/** | |
* Facebook Chat SDK that tells you the hour | |
*/ | |
var request = require("request"); | |
var page_token = "page_token"; | |
module.exports.respond = function (event, cb) { |
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
$('*[data-poload]').hover(function() { | |
var e = $(this); | |
e.off('hover'); | |
$.get(e.data('poload'), function(d) { | |
e.popover({ | |
content: d | |
}).popover('show'); | |
}); | |
}); |
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 | |
public function onBootstrap(EventInterface $e){ | |
$em = $e->getApplication()->getEventManager(); | |
$em->attach(MvcEvent::EVENT_ROUTE, array( | |
$this, | |
'detachNotFoundStrategy' | |
) , 1); | |
} |
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
@GET | |
@Path("/helloworld/{id}") | |
public Response indexEndpoint(@PathParam int id) { | |
return Response.status(200).entity("Hello world: " + id).build(); | |
} |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:*", | |
"s3:*", | |
"lambda:*", | |
"execute-api:*", |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:*", | |
"s3:*", | |
"lambda:*", | |
"execute-api:*", |
OlderNewer