Skip to content

Instantly share code, notes, and snippets.

@MarkAtOmniux
MarkAtOmniux / index.ts
Created March 26, 2023 15:17
Example of a custom BeforeDashboard React Component that displays the total amount of storage space left in a Google Cloud Bucket
import React, { useEffect, useState } from 'react'
import * as gcs from '@google-cloud/storage';
const SpaceRemaining = () => {
const [totalBytes, setTotalBytes] = useState(null);
const [limitBytes, setLimitBytes] = useState(null);
const [error, setError] = useState(null);
useEffect(() => {
const fetchBucketInfo = async () => {
@jerriclynsjohn
jerriclynsjohn / 1.rollup.config.js
Last active February 25, 2022 15:42
Svelte + Tailwind + Storybook - Starter Template
import svelte from 'rollup-plugin-svelte';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import postcss from 'rollup-plugin-postcss';
import autoPreprocess from 'svelte-preprocess';
const production = !process.env.ROLLUP_WATCH;