Skip to content

Instantly share code, notes, and snippets.

View DonKoko's full-sized avatar
🏄‍♂️
...

Nikolay Bonev DonKoko

🏄‍♂️
...
View GitHub Profile
@DonKoko
DonKoko / route.tsx
Created March 27, 2023 16:18 — forked from rphlmr/route.tsx
Remix Supabase Upload
// if you don't plan to upload only images :
/*
async function convertToFile(data: AsyncIterable<Uint8Array>) {
const chunks = [];
for await (const chunk of data) {
chunks.push(chunk);
}
return chunks;
}
var Meter = function (props) {
var {
percent = 0, // a number between 0 and 1, inclusive
width = 100, // the overall width
height = 10, // the overall height
rounded = true, // if true, use rounded corners
color = "#0078bc", // the fill color
animate = false, // if true, animate when the percent changes
label = null // a label to describe the contents (for accessibility)
} = props;
@DonKoko
DonKoko / development.rb
Created January 23, 2020 16:06 — forked from ryanb/development.rb
Some rack middleware to add headers to asset pipeline.
class AssetHeaders
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
response = @app.call(env)
if request.path =~ /^\/assets\//
# there maybe a better way to add headers