Skip to content

Instantly share code, notes, and snippets.

import * as functions from "firebase-functions";
import * as firebase from "firebase-admin";
import { parseAsync } from 'json2csv';
import { v4 as uuidv4 } from 'uuid';
import * as fs from "fs";
import * as path from "path";
import * as os from "os";
firebase.initializeApp({
storageBucket: 'storage-bucket-name',
@tohagan
tohagan / event.video.youtube.js
Created May 1, 2021 06:09 — forked from benwong/event.video.youtube.js
YouTube iFrame API wrapper for event videos
var EventYouTubeVideo = (function(){
var module = {};
module.init = function(){
var tag = document.createElement('script');
tag.src = "http://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
};
@tohagan
tohagan / ts-quasar-cli.md
Last active July 5, 2021 08:30
Add typescript supports to quasar framework

Note: This guide applies to the project created by quasar-cli.

First install typescript and ts-loaderpackages in your project.

npm i -D typescript ts-loader

Then modified the quasar.conf.js file in your project:

const express = require('express');
const app = express();
// Application
app.get('/', function(req, res) {
if (process.env.NODE_ENV === 'development') {
for (var key in require.cache) {
delete require.cache[key];
}
}
@tohagan
tohagan / csv2html.js
Created July 1, 2017 15:05 — forked from RandomEtc/csv2html.js
Quick node.js script to convert a CSV file to HTML
// first of all make sure we have enough arguments (exit if not)
if (process.argv.length != 5)
{
console.error("Usage: node csv2html.js input.csv template.ejs output.html")
console.error();
console.error("Outputs the given template for each row in the given input.")
console.error("Uses the first row of the CSV as column names in the template.")
process.exit(1);
}
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using FluentMigrator;
using FluentMigrator.Model;
using FluentMigrator.SchemaDump.SchemaWriters;