Skip to content

Instantly share code, notes, and snippets.

View nhattan's full-sized avatar
🎯
Focusing

Tan Nguyen nhattan

🎯
Focusing
View GitHub Profile
@nhattan
nhattan / upload.js
Last active December 4, 2021 17:38
Create a blob by uploading data from a browser (ReactJS)
/*
https://www.npmjs.com/package/@azure/storage-blob
npm install @azure/storage-blob
OR
yarn add @azure/storage-blob
Remember to set up the CORS rules for your storage https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-javascript-client-libraries#setting-up-storage-account-cors-rules
*/
const { BlobServiceClient } = require("@azure/storage-blob")
@nhattan
nhattan / .gitlab-ci.yaml
Created March 19, 2020 08:15
Gitlab CI/CD for Rails, Postgres, Rspec, Brakeman
stages:
- build
- test
- deploy
.base:
image: ruby:2.7.0
cache:
key: gems_and_packages
paths:
@nhattan
nhattan / Dockerfile
Created March 20, 2020 09:46
Rails 6 Dockerfile
FROM ruby:2.7.0
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \
apt-get update -qq && apt-get install -y \
build-essential \
nodejs \
yarn
RUN mkdir /app