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
// This JS will switch FB messenger to dark theme | |
var css = ` | |
:root, .__fb-light-mode { | |
--fds-black: black; | |
--fds-black-alpha-05: rgba(0, 0, 0, 0.05); | |
--fds-black-alpha-10: rgba(0, 0, 0, 0.1); | |
--fds-black-alpha-15: rgba(0, 0, 0, 0.15); | |
--fds-black-alpha-20: rgba(0, 0, 0, 0.2); | |
--fds-black-alpha-30: rgba(0, 0, 0, 0.3); | |
--fds-black-alpha-40: rgba(0, 0, 0, 0.4); |
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
<touchégg> | |
<settings> | |
<property name="composed_gestures_time">0</property> | |
</settings> | |
<application name="All"> | |
<gesture type="TAP" fingers="2" direction="UNKNOWN"> | |
<action type="MOUSE_CLICK">undefined</action> | |
</gesture> | |
<gesture type="TAP" fingers="3" direction="UNKNOWN"> | |
<action type="MOUSE_CLICK">undefined</action> |
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
sudo timeshift --create --scripted --comments "Fresh install" &> /dev/null # first snapshot works but reports error | |
echo "*******Install Foundation*******" | |
sudo cp -rf /etc /etc.orig | |
# Allow sudo password prompts and sessions to last forever | |
print "\nDefaults env_reset,timestamp_timeout=-1,passwd_timeout=0\n" | sudo tee -a /etc/sudoers | |
# Set suspend to always suspend-then-hibernate | |
sudo ln -s /usr/lib/systemd/system/systemd-suspend-then-hibernate.service /etc/systemd/system/systemd-suspend.service |
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
#!/usr/bin/env zx | |
/* eslint-disable i18next/no-literal-string */ | |
// eslint-disable-next-line import/no-unresolved | |
import { startSpinner } from 'zx/experimental'; | |
import { | |
assertGit, | |
assertGithubCli, |
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
/** | |
* This CLI script will scrub/delete a translation from all translation files | |
*/ | |
const path = require('path'); | |
const fs = require('fs'); | |
const execSync = require('child_process').execSync; | |
const toDelete = process.argv[2]; |
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
#!/bin/bash | |
TIMEFORMAT=%R | |
function fetchWithGlobals { | |
curl 'https://zztr-140.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.store/Sites-RefArch-Site/en_US/HelloGlobals' \ | |
-H 'authority: zztr-140.sandbox.us01.dx.commercecloud.salesforce.com' \ | |
-H 'cache-control: max-age=0' \ | |
-H 'upgrade-insecure-requests: 1' \ | |
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36' \ | |
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \ |
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
'use strict'; | |
var ArrayN = { | |
findIndex: findIndex, | |
find: find, | |
includes: includes, | |
keyBy: keyBy, | |
test: test, | |
}; | |
Object.getOwnPropertyNames(Array).forEach(function(name) { |
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
'use strict'; | |
var ObjectN = { | |
assign: assign, | |
create: create, | |
entries: entries, | |
fromEntries: fromEntries, | |
pick: pick, | |
pickBy: pickBy, | |
omit: omit, |
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 * as fs from 'fs' | |
import * as glob from 'glob' | |
const datasource = fs.readFileSync('prisma/datasource.prisma') | |
const moduleFiles = glob.sync('src/**/*.prisma', {}) | |
const modules = moduleFiles.reduce((a,f) => { | |
const module = fs.readFileSync(f) | |
return a + module |
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
/** | |
* Class to make Indexed Database's easy for Key-Value Stores | |
* | |
* In addition to wrapping IDB, it also adds a feature for maxAge, | |
* which can discard records if createdAt + maxAge > now | |
* | |
* Adapted from https://github.com/elias551/simple-kvs | |
* - Adds timestamp field and garbage collection feature. | |
*/ | |
export default class KeyValueStore { |