This file contains 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
<add path="report.pdf" verb="GET" type="Subcontractor_Module.Handlers.GetPdfReport" name="pdf_report_handler" | |
resourceType="Unspecified" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,bitness32" /> | |
<add path="report.pdf" verb="GET" type="Subcontractor_Module.Handlers.GetPdfReport" name="pdf_report_handler64" | |
resourceType="Unspecified" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,bitness64" /> |
This file contains 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
package com.github.gist.codecitizen.jpa.converters; | |
import javax.persistence.AttributeConverter; | |
import javax.persistence.Converter; | |
import java.sql.Timestamp; | |
import java.time.LocalDateTime; | |
/** | |
* Maps {@link java.time.LocalDateTime} entity attributes to {@link java.sql.Timestamp} values | |
* so a temporal value instead of {@code bytea} is written to the database. |
This file contains 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
(def time-slot-ms 52) | |
(def truncate 10) | |
(defn ** [b e] | |
(reduce * (repeat e b))) | |
(defn with-exp-backoff [action!] | |
(loop [c 0] | |
(let [slot (* time-slot-ms (dec (** 2 c)))] | |
(println "Sleeping for " slot "ms.") |
This file contains 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 saml2 = require('saml2-js'); | |
const fs = require('fs'); | |
var express = require('express'); | |
var app = express(); | |
var bodyParser = require('body-parser'); | |
app.use(bodyParser.urlencoded({ | |
extended: true | |
})); | |
This file contains 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
import pprint | |
import inspect | |
pp = pprint.PrettyPrinter(depth=6) | |
pp.pprint(inspect.getmembers(myObject)) |
This file contains 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
service: my-service | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
stage: ${opt:stage, 'dev'} | |
environment: | |
REDIS_HOST: | |
"Fn::GetAtt": [ElasticCacheCluster, RedisEndpoint.Address] | |
functions: |
This file contains 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
service: aws-step-functions-showcase | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
iamRoleStatements: | |
- Effect: "Allow" | |
Action: | |
- "states:StartExecution" | |
Resource: |
This file contains 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
(ns list-classes-from-jar | |
(:import (java.util.jar JarFile))) | |
(def jar-file (JarFile. "target/s3-file-upload-sls-1.0.0-SNAPSHOT-standalone.jar")) | |
(def entries (.entries jar-file)) | |
(while (.hasMoreElements entries) | |
(let [entry (.nextElement entries)] | |
(println (.getName entry)))) |
This file contains 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
// POST /trigger { path: "" } | |
module.exports.trigger = async (event, context) => { | |
const id = uuid(); | |
await stepfunctions.startExecution({ | |
stateMachineArn: process.env.STATE_MACHINE_ARN, | |
input: JSON.stringify(event.body), | |
name: id | |
}); |
OlderNewer