Skip to content

Instantly share code, notes, and snippets.

View amatracaru's full-sized avatar

Andrei Matracaru amatracaru

View GitHub Profile
@amatracaru
amatracaru / pre-commit
Last active November 30, 2021 14:14 — forked from simonauner/pre-commit
Format c# with dotnet-format with pre-commit hook
#!/bin/sh
# Modified from https://gist.github.com/simonauner/09d4e3241f26d2bd139261816e6c18f6
#
# This script finds the files that are about to be committed,
# and runs dotnet format on them before adding them back to staging
#
# install dotnet-format: dotnet tool install -g dotnet-format
# make sure installed dotnet tools are on your path:
# export PATH="$PATH:$HOME/.dotnet/tools/"
# copy to .git/hooks/pre-commit and make executable
@amatracaru
amatracaru / index.js
Created July 22, 2021 15:29
Lambda that streams HTTP file content to S3
const request = require('request');
const stream = require('stream');
const aws = require('aws-sdk');
const s3 = new aws.S3();
exports.handler = async (event) => {
const uploadFromStream = () => {
@amatracaru
amatracaru / .prettierrc
Created January 2, 2018 19:26
Prettier config
{
"printWidth": 100,
"useTabs": true,
"jsxBracketSameLine": true,
"singleQuote": true
}