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")
@smoil
smoil / account.rb
Last active March 2, 2020 00:32
Ajax select/multi select in Rails using Select2
class Account < ActiveRecord::Base
def self.search(name = nil)
# search logic
end
end