Skip to content

Instantly share code, notes, and snippets.

View litewarp's full-sized avatar

Nick Sethi litewarp

View GitHub Profile
@litewarp
litewarp / Companies.js
Last active August 2, 2021 20:31
Wix Functions
const replaceCompanyName = () => {
const rows = Array.from(document.querySelector('table > tbody').childNodes);
rows.forEach(row => {
const firstChild = row.firstChild;
// text is two divs down
const contentDiv = firstChild.firstChild.firstChild;
const name = contentDiv.innerText;
const anchor = document.createElement('a');
anchor.setAttribute('style', 'text-decoration: underline');
const href = `https://legaltech.com/companies/${name.replace(/\s/g, '-').toLowerCase()}`;
@litewarp
litewarp / howto.md
Last active May 25, 2022 07:31
Javascript Applet

Add the following tags to your head

<meta name="pluscriber-verification" content="YOUR PUBLICATION ID">
<script async src="https://pluscriber.com/assets/pluscriber.js"></script>
@litewarp
litewarp / ClientComponent.tsx
Last active March 23, 2023 21:04
Relay Nextjs13
'use client'
import {graphql} from 'react-relay'
import graphqlQuery, {
AllSecuritiesPageQuery
} from '~/__generated__/AllSecuritiesPageQuery.graphql'
import {createRelayHydrator} from '~/lib/relay/create-relay-hydrator'
export const {useHydratedPreloadedQuery, Hydrator} =
createRelayHydrator<AllSecuritiesPageQuery>(graphqlQuery)
@litewarp
litewarp / with-pgclient-resource.ts
Created February 16, 2024 04:52
WithPgClientResourceStep
import type { PgClient, PgCodec, WithPgClient } from '@dataplan/pg';
import type { PgTableResource } from '@graphile-contrib/pg-many-to-many';
import {
ExecutableStep,
type AccessStep,
type ExecutionExtra,
type GrafastResultsList,
type GrafastValuesList,
access,
type SetterStep,