Skip to content

Instantly share code, notes, and snippets.

View graysonhicks's full-sized avatar
🤠

Grayson Hicks graysonhicks

🤠
View GitHub Profile
@benawad
benawad / Resolver.ts
Last active June 1, 2021 15:59
middleware role
@UseMiddleware(hasRole("admin"))
@Query(() => String)
async hello() {
return "Hello World!";
}
@supinf
supinf / s3-invalidation.js
Last active January 7, 2023 08:57
AWS Lambda script:: CloudFront Invalidations which are triggered by s3 events.
console.log('Loading event');
var Q = require('q');
var aws = require('aws-sdk');
var cloudfront = new aws.CloudFront();
exports.handler = function (event, context) {
//_log('Received event: ', event);
var bucket = event.Records[0].s3.bucket.name;
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})