Skip to content

Instantly share code, notes, and snippets.

@shriharip
shriharip / FirebaseCloudStoragePlugin.ts
Created January 10, 2025 22:23 — forked from benedictchen/FirebaseCloudStoragePlugin.ts
Firebase Cloud Storage Plugin for Uppy (File Uploader Library)
import { BasePlugin } from '@uppy/core'
import { Uppy, UppyOptions } from '@uppy/core';
import { getAuth } from 'firebase/auth';
import {
UploadTaskSnapshot,
getDownloadURL,
getStorage,
uploadBytesResumable,
ref,
} from 'firebase/storage';
@shriharip
shriharip / node-express-multer-memoryStorage-firebase.js
Created January 10, 2025 21:47 — forked from raditotev/node-express-multer-memoryStorage-firebase.js
Uploading files to Firebase/ Storage using Nodejs, express and multer with memoryStorage as storage option
const express = require('express');
const morgan = require('morgan');
const cors = require('cors');
const createError = require('http-errors');
const bodyParser = require('body-parser');
const { initializeApp } = require('firebase/app');
const {
getStorage,
ref,
uploadBytes,
@shriharip
shriharip / index.html
Created April 24, 2024 15:27
tailwind responsive nav (https://langcss.com/demo)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Nav</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
function toggleNavbar(collapseID) {
@shriharip
shriharip / index.js
Created September 13, 2023 16:29
Uppy companion example
const fs = require('node:fs')
const path = require('node:path')
const crypto = require('node:crypto')
const companion = require('@uppy/companion')
require('dotenv').config({ path: path.join(__dirname, '.env') })
const app = require('express')()
const DATA_DIR = path.join(__dirname, 'tmp')
@shriharip
shriharip / schema.prisma
Created August 29, 2023 16:46
wordpress db in prisma schema
datasource db {
provider = "mysql"
url = "mysql://exampleuser:examplepass@localhost:2234/exampledb"
}
model WpComment {
comment_ID Int @id
commentAgent String @map("comment_agent")
commentApproved String @map("comment_approved")
commentAuthorEmail String @map("comment_author_email")
@shriharip
shriharip / main.dart
Created November 17, 2021 13:06
listview flutter with out rebuilding the complete list (with null safety)
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
@shriharip
shriharip / config.h
Created February 12, 2021 18:59
dactyl manuform config
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
@shriharip
shriharip / keymap.c
Created February 12, 2021 18:55
dactyl manuform keymap
#include QMK_KEYBOARD_H
#define _BASE 0
#define _RAISE 1
#define _LOWER 2
#define _SHORTC 3
// Fillers to make layering more clear
@shriharip
shriharip / helloworld.md
Last active February 6, 2021 11:24
testing gist.io

Hi, this is a test to see how gist.io works

Hello World!

Writing in markdown is nice!