Skip to content

Instantly share code, notes, and snippets.

View 0xmovses's full-sized avatar
👾

Richard Melkonian 0xmovses

👾
View GitHub Profile
@0xmovses
0xmovses / config-overrides.js
Created May 2, 2022 22:56
webpack 5 overrides
//install react-app-rewired and all the broswerify packages
const webpack = require('webpack');
module.exports = function override(config) {
const fallback = config.resolve.fallback || {};
Object.assign(fallback, {
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
"assert": require.resolve("assert"),
"http": require.resolve("stream-http"),
@0xmovses
0xmovses / main.go
Created April 27, 2022 21:45
simple go webhook
package main
import (
"fmt"
"log"
"net/http"
"os"
"github.com/gorilla/websocket"
)
@0xmovses
0xmovses / gist:f452ce5e0d5f43162ac55b45795c5808
Last active January 25, 2022 11:33
S3 event message structure
useful when testing lamdas for s3 buckets
{
"Records":[
{
"eventVersion":"2.2",
"eventSource":"aws:s3",
"awsRegion":"us-west-2",
"eventTime":"The time, in ISO-8601 format, for example, 1970-01-01T00:00:00.000Z, when Amazon S3 finished processing the request",
"eventName":"event-type",
@0xmovses
0xmovses / gist:78f386a15654b451532f8a0a0ff26d50
Last active December 22, 2021 14:17
aws-next.js file upload unsignedpost
//client-side code
const formik = useFormik({
initialValues: {
username: '',
bio: '',
img: ''
},
onSubmit: async (values) => {
let data = new FormData();