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
{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,204,243,247,401,402,411,412,416,451,455,489,496]},{"id":2,"callFrame":{"functionName":"run","scriptId":"235","url":"node:internal/modules/esm/module_job","lineNumber":262,"columnNumber":11},"hitCount":0,"children":[3,417]},{"id":3,"callFrame":{"functionName":"","scriptId":"231","url":"node:internal/modules/esm/translators","lineNumber":199,"columnNumber":62},"hitCount":0,"children":[4]},{"id":4,"callFrame":{"functionName":"cjsLoader","scriptId":"231","url":"node:internal/modules/esm/translators","lineNumber":308,"columnNumber":37},"hitCount":0,"children":[5]},{"id":5,"callFrame":{"functionName":"wrapModuleLoad","scriptId":"64","url":"node:internal/modules/cjs/loader","lineNumber":226,"columnNumber":23},"hitCount":0,"children":[6]},{"id":6,"callFrame":{"functionName":"traceSync","scriptId":"67","url":"node:diagnostics_channel","lineNumber":319,"columnNumber":11},"hitCount |
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
import { PutObjectCommand, S3Client } from '@aws-sdk/client-s3'; | |
import { | |
MetadataAttributeType, | |
ProfileMetadataSchema, | |
profile, | |
} from '@lens-protocol/metadata'; | |
import { v4 as uuidv4 } from 'uuid'; | |
import { z } from 'zod'; | |
import { env } from '~/env'; |
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
name: Flightcontrol Webhook Deployment | |
env: | |
DEPLOYMENT_URL: "" | |
on: workflow_dispatch | |
jobs: | |
backend-deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
steps: |
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
import type { NextApiRequest, NextApiResponse } from "next" | |
import { withSentry } from "@sentry/nextjs" | |
import { BUILD_ID } from "constants/frontend" | |
const handler = (_req: NextApiRequest, res: NextApiResponse) => { | |
res.status(200).json({ | |
buildId: BUILD_ID, | |
}) | |
} |
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
// The `CreateCollection` is similar to `CREATE TABLE ` in SQL. The same for `CreateIndex`. | |
CreateCollection({name: "artists"}); | |
CreateCollection({name : "songs"}); | |
CreateCollection({name : "albums"}); | |
// We are emulating the primary keys of each respective table by specifying unique as true. | |
CreateIndex({name : "artists_by_id", source : Collection("artists"), terms : [ {field : [ "data", "artist_id" ]} ], unique : true}) | |
CreateIndex({name : "songs_by_id", source : Collection("songs"), terms : [ {field : [ "data", "song_id" ]} ], unique : true}) |
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
getParameterByName(name: string, url: string) { | |
if (!url) { url = window.location.href; } | |
name = name.replace(/[\[\]]/g, '\\$&'); | |
const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), | |
results = regex.exec(url); | |
if (!results) { return null; } | |
if (!results[2]) { return ''; } | |
return decodeURIComponent(results[2].replace(/\+/g, ' ')); | |
} |
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
for (var i=1; i <= 100; i++) { | |
if (i % 15 == 0) | |
console.log("FizzBuzz"); | |
else if (i % 3 == 0) | |
console.log("Fizz"); | |
else if (i % 5 == 0) | |
console.log("Buzz"); | |
else | |
console.log(i); |
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
var numeralCodes = [["","I","II","III","IV","V","VI","VII","VIII","IX"], // Ones | |
["","X","XX","XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"], // Tens | |
["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"]]; // Hundreds | |
function convert(num) { | |
var numeral = ""; | |
var digits = num.toString().split('').reverse(); | |
for (var i=0; i < digits.length; i++){ | |
numeral = numeralCodes[i][parseInt(digits[i])] + numeral; | |
} |
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
function ordinalSuffix(i) { | |
const j = i % 10, | |
k = i % 100; | |
if (j === 1 && k !== 11) { | |
return i + 'st'; | |
} | |
if (j === 2 && k !== 12) { | |
return i + 'nd'; | |
} | |
if (j === 3 && k !== 13) { |
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
$('a[href*="#"]:not([href="#"], [href="#carousel"])') | |
.click(function() { | |
if (location.pathname.replace(/^\//, '') === | |
this.pathname.replace(/^\//, '') && | |
location.hostname === this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : | |
$('[name=' + this.hash.slice(1) + ']'); | |
if (target.length) { | |
$('html, body').animate({ |
NewerOlder