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
export default function ProgressBar({ currentLevel }: { currentLevel: number }) { | |
return ( | |
<div className="flex justify-between items-center font-mono relative"> | |
{Array.from({ length: 9 }, (_, i) => i).map((index) => ( | |
<div | |
key={index} | |
className={`absolute h-1 z-0 ${index < currentLevel - 1 ? "bg-white" : "bg-zinc-800"}`} | |
style={{ left: `calc(${(index / 10) * 100}% + 4%)`, width: `11%` }} | |
></div> | |
))} |
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 getTasks = (ownerId, after) => | |
hubspotInstance | |
.post("/crm/v3/objects/tasks/search", { | |
after, | |
limit: 100, | |
filterGroups: [ | |
{ | |
filters: [ | |
{ |
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
Show hidden characters
{ | |
"$schema": "https://json.schemastore.org/tsconfig", | |
"compilerOptions": { | |
"allowJs": false, | |
"alwaysStrict": true, | |
"baseUrl": ".", | |
"esModuleInterop": true, | |
"forceConsistentCasingInFileNames": true, | |
"incremental": true, | |
"isolatedModules": true, |
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
{ | |
"user_package_id": "a12802db-834f-48c4-89f2-e4a1558e8bc2", | |
"user_package_state": 0, | |
"redeemable": null, | |
"invoice": { | |
"status": 4, | |
"receipt_no": "II9947171", | |
"id": "8bf6c016-b107-41b9-8218-2c6b90c4aba7", | |
"no": "II9947171" | |
}, |
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
.nav { | |
--link-one: 160px; | |
--link-two: 160px; | |
--link-three: 160px; | |
--link-four: 160px; | |
--link-five: 160px; | |
--menu-width: calc(var(--link-one) + var(--link-two) + var(--link-three) + var(--link-four) + var(--link-five)); | |
--link-two-left: var(--link-one); |
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 firebase from "firebase/app"; | |
import "firebase/database"; | |
export const onceValue = <T>(path: string): Promise<Nullable<T>> => | |
firebase | |
.database() | |
.ref(path) | |
.once("value") | |
.then((snap) => snap.val()); | |
export const firebaseUpdate = (path: string, updateObj: Object) => firebase.database().ref(path).update(updateObj); |
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
export const saveLiveSwitchRecording = async ( | |
recordingId: string, | |
channelId: string, | |
fileName: string, | |
type: "video" | "audio" | |
) => { | |
const file = makeLiveSwitchRecordingFile(recordingId, channelId, fileName); | |
const format = fileName.substring(fileName.indexOf(".") + 1); | |
const writeStream = file.createWriteStream({ | |
metadata: { |
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 getChromeVersion = () => { | |
const raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./) | |
return raw ? parseInt(raw[2], 10) : false | |
} | |
if (getChromeVersion() < 93) { | |
alert('We recommend you use a Chrome browser version 93 or greater otherwise you may experience degraded service.') | |
} |
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') | |
Axios({ | |
method: 'POST', | |
headers: { | |
Authorization: 'Basic thisisyourbase64authtoken', | |
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', | |
}, | |
data: JSON.stringify({ | |
recipient: { |
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 client = require("twilio")(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN); | |
const getDateObj = () => { | |
const date = new Date(); | |
const hour = date.getHours(); | |
const d = date.getDate(); | |
const m = date.getMonth() + 1; | |
const y = date.getFullYear(); | |
return { hour, date: `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d}` }; |
NewerOlder