This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"math/rand" | |
"os" | |
"sort" | |
"strconv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Resizes an Image File and converts it to a dataurl string. | |
* @param imageFile the image file (probably from a file input) | |
* @param resize_width The width you want the image to be | |
* @param quality quality of the resize image 0 - 1 | |
*/ | |
const resizeImage = ({ | |
resizeWidth = 400, | |
imageFile, | |
quality = 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const { get } = require("axios").default; | |
const { randomBytes } = require("crypto"); | |
const app = express(); | |
app.use(express.json()); | |
const CSVtoJson = (csvStr = "", selected = []) => { | |
var parsedRows = []; | |
var quote = false; // inside quotes? |