Skip to content

Instantly share code, notes, and snippets.

View dmurawsky's full-sized avatar

Daniel Murawsky dmurawsky

View GitHub Profile
query {
users {
accounts {
people {
personUser {
firstName
}
}
}
}
const express = require('express')
const app = express()
const AWS = require('aws-sdk')
const s3 = new AWS.S3()
const signedUrlExpireSeconds = 60 * 5
const bucket = 'mf-uploads'
<button class="bg-grey-light hover:bg-grey text-grey-darkest font-bold py-2 px-4 rounded inline-flex items-center">
<div style="width: 30px;"><img src="/img.png" style="width:100% /></div>
<span>Download</span>
</button>
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>AKIAJOD2E4D4KY6GIITQ</AWSAccessKeyId><StringToSign>POST
multipart/form-data
1546547029
/4ev-image-testing/dfd10d7a-dbfe-4e38-a9bd-c779899ef5ca/1yjyrlI3NB-5dA-3y06js.jpg</StringToSign><SignatureProvided>PBq8WI4rs33PxSLcXFTpOYG6Hzg=</SignatureProvided><StringToSignBytes>50 4f 53 54 0a 0a 6d 75 6c 74 69 70 61 72 74 2f 66 6f 72 6d 2d 64 61 74 61 0a 31 35 34 36 35 34 37 30 32 39 0a 2f 34 65 76 2d 69 6d 61 67 65 2d 74 65 73 74 69 6e 67 2f 64 66 64 31 30 64 37 61 2d 64 62 66 65 2d 34 65 33 38 2d 61 39 62 64 2d 63 37 37 39 38 39 39 65 66 35 63 61 2f 31 79 6a 79 72 6c 49 33 4e 42 2d 35 64 41 2d 33 79 30 36 6a 73 2e 6a 70 67</StringToSignBytes><RequestId>73A64CA280BF66C6</RequestId><HostId>4SsKeZte4RTqaDFQYe1k2PTLRp2sMzcGmc5YsW45UjpR08cTO1JhUdrFjcdQYun1jt9KnClFoZQ=</HostId></Error>
Upserting Bucket for CodeDeploy
Upserting Bucket for CodePipeline
No changes for stack 'mu-bucket-codepipeline'
No changes for stack 'mu-bucket-codedeploy'
Upserting IAM resources
No changes for stack 'mu-iam-common'
unable to find environment named 'acceptance' in configuration...skipping IAM roles
unable to find environment named 'production' in configuration...skipping IAM roles
func1 ▶ ERROR unable to find environment stack named 'mu-environment-acceptance'
func1 ▶ ERROR
{
"error": "No user found for email: dmurawsky@fortisar.com"
}
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>materialize</title>
</head>
function isValidDomain(v, opts) {
if (typeof v !== 'string') return false
if (!(opts instanceof Object)) opts = {}
var parts = v.split('.')
if (parts.length <= 1) return false
var tld = parts.pop()
var tldRegex = /^(?:xn--)?[a-zA-Z0-9]+$/gi
@dmurawsky
dmurawsky / next_example.js
Created May 6, 2019 17:56
next.js page example
export default () => (
<div id="wrapper">
<div className="post">
<h1>The Beginning</h1>
<h3>January 1998</h3>
<p>
I was trapped in hell . . . . . a hell of my own making. Two and a half
years prior to this date, I married a man I had no business marrying.
Our relationship should have never evolved past a first date, let alone
progress to marriage. I ignored all of the glaring, neon-flashing red
@dmurawsky
dmurawsky / now.json
Last active May 16, 2019 16:05
basic next.js server with stripe
{
"version": 2,
"builds": [
{ "src": "api/*.js", "use": "@now/node" },
{ "src": "package.json", "use": "@now/next" }
],
"env": {
"STRIPE_SECRET_KEY": "@acj_stripe_secret_key"
},
"routes": [{ "src": "/blog/(?<name>[^/]+)$", "dest": "/blog?id=$name" }]