Skip to content

Instantly share code, notes, and snippets.

View osdiab's full-sized avatar

Omar Diab osdiab

View GitHub Profile
@osdiab
osdiab / SketchSystems.spec
Last active March 1, 2019 07:27
Email Task App
Email Task App
Splash Page*
login -> Inbox
Inbox&
Thread List
Inbox Instance*
Drafts
select draft -> Go To Message?
@osdiab
osdiab / _README.md
Last active December 28, 2022 18:30
Deletes all your cached URLs in prerender

You can run this by doing the following:

  1. Log into https://prerender.io
  2. Open the developer console on the prerender site
  3. Copy the code in this gist and paste it into your console
  4. Hit enter!

Some notes:

  • This script takes a while, Prerender is not very performant! So if you have a lot of cached URLs, be patient.
@osdiab
osdiab / snippet.html
Created July 28, 2021 22:53
Income Movement Donate Button Embed
<html>
<body>
<a href="https://www.every.org/incomemovement/donate">Donate!</a>
<script>
(function () {
document.addEventListener("DOMContentLoaded", function () {
document
.querySelector("#edoDonateButtonScript")
.addEventListener("load", () => {
@osdiab
osdiab / generate-all-translations.ts
Last active September 14, 2022 11:53
Type Safe remix-i18next
// this script reads through app/locales/*/*.json, copies them to public/locales,
// and generates a typescript file that can be used for making nice typings.
// it can be extended in the future to actually read the contents to allow for
// typesafe interpolation of variables.
import { join, relative } from "node:path";
import { cp, rm, writeFile } from "node:fs/promises";
import { promisify } from "node:util";
import { glob } from "glob";
import camelCase from "camelcase";
@osdiab
osdiab / fragment-masking-plugin.ts
Last active November 23, 2024 07:15
fragment masking with graphql-codegen near-operation-file preset
import type { PluginFunction } from "@graphql-codegen/plugin-helpers";
export type FragmentMaskingPluginConfig = {
useTypeImports?: boolean;
augmentedModuleName?: string;
unmaskFunctionName?: string;
emitLegacyCommonJSImports?: boolean;
isStringDocumentMode?: boolean;
typesImportPath?: string; // this is new
};