This file contains 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
import { Paper, ToggleButton, ToggleButtonGroup } from "@mui/material"; | |
import { useStore } from "@nanostores/react"; | |
import { atom } from "nanostores"; | |
export type EmissionsView = "Market-Based" | "Location-Based"; | |
const EMISSIONS_VIEWS: Array<EmissionsView> = [ | |
"Market-Based", | |
"Location-Based", | |
] as const; | |
export const selectedEmissionsView = atom<EmissionsView>(EMISSIONS_VIEWS[0]); |
This file contains 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 axios = require("axios"); | |
const fs = require("fs"); | |
const asyncPool = require("tiny-async-pool"); | |
const { Pool } = require("pg"); | |
// db connection | |
// the location the partial animal records will come FROM | |
// in this case any prod_like replica would work - only condition is the addition of the is_migrated col to the schema | |
const pool = new Pool({ | |
user: "someDbAdmin", |
This file contains 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
import java.awt.image.BufferedImage | |
import javax.imageio.ImageIO | |
import groovy.transform.CompileStatic | |
// pdfbox imports | |
import org.apache.pdfbox.cos.* | |
import org.apache.pdfbox.pdmodel.* | |
import org.apache.pdfbox.pdmodel.common.* | |
import org.apache.pdfbox.rendering.PDFRenderer | |
class PdfService { |
This file contains 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 gvl.ss | |
import org.apache.poi.ss.usermodel.* | |
import org.apache.poi.hssf.usermodel.* | |
//import org.apache.poi.xssf.usermodel.* | |
//import org.apache.poi.POIXMLDocument | |
class SpreadsheetBuilder { | |
/* Builds a new .xls file from well formatted data array |
This file contains 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 org.some.place | |
class AuthToken { | |
String tokenValue | |
String username | |
Date refreshed = new Date() | |
static constraints = { | |
} |
This file contains 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
Include = | |
savePrevious: -> | |
@constructor.records[@id].previousAttributes = @attributes() | |
revertChanges: -> | |
if @previousAttributes |
This file contains 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 gvl | |
import grails.converters.JSON | |
class ErrorController { | |
// Forbidden | |
def error403() { | |
withFormat { | |
html { render(view: 'error403') } |