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 jsdom = require("jsdom"); | |
const { JSDOM } = jsdom; | |
const userAgent = | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0"; | |
const cookieJar = new jsdom.CookieJar(); | |
const resources = new jsdom.ResourceLoader({ | |
userAgent |
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
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get install --no-install-recommends -y xserver-xorg xinit x11-xserver-utils | |
sudo apt-get install -y chromium-browser matchbox-window-manager xautomation unclutter xdotool | |
sudo tee /boot/kiosk.sh <<EOF | |
#!/bin/sh | |
xset -dpms # disable DPMS (Energy Star) features. | |
xset s off # disable screen saver | |
xset s noblank # don't blank the video device |
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
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
import React, { useImperativeHandle, forwardRef } from "react"; | |
import { Chart } from "frappe-charts/dist/frappe-charts.esm"; | |
type ChartType = "line" | "bar" | "axis-mixed" | "pie" | "percentage" | "heatmap"; | |
type AxisMode = "span" | "tick"; | |
type ChartData = { | |
labels?: Array<string>; |
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 { useState } from "react"; | |
export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>; | |
export type Unsaved<T extends { _id: string; updatedAt: Date }> = Optional< | |
T, | |
"_id" | "updatedAt" | |
>; | |
interface User { | |
_id: string; |
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 { customAlphabet } = require("nanoid"); | |
const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
const deadbeef = [ | |
"0ff1ce", | |
"10cc", | |
"1ce", | |
"ab1e", | |
"abad", |
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
#!/bin/bash | |
set +x | |
if [ -d Mars ]; then | |
cd Mars | |
git pull | |
cd .. | |
else | |
git clone https://[email protected]/Magnum3D/Mars | |
fi |
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
{ | |
"Records": [ | |
{ | |
"messageId": "fec4fd9f-1a09-4449-8e1a-6e379dca4d2b", | |
"receiptHandle": "base64-encoded-something", | |
"body": "dasdsa", | |
"attributes": {}, | |
"messageAttributes": {}, | |
"md5OfBody": "7c1cadb6887373dacb595c47166bfbd9", | |
"eventSource": "aws:sqs", |
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
2020-03-29T17:29:39.263Z d0892cf5-0a04-407e-ad9c-f07bda11623d WARN Error TypeError: argument must be a buffer | |
at Object.inspect (buffer.js:814:18) | |
at formatValue (internal/util/inspect.js:693:31) | |
at formatProperty (internal/util/inspect.js:1558:11) | |
at formatRaw (internal/util/inspect.js:933:9) | |
at formatValue (internal/util/inspect.js:721:10) | |
at inspect (internal/util/inspect.js:264:10) | |
at formatWithOptions (internal/util/inspect.js:1865:40) | |
at Object.format (internal/util/inspect.js:1695:10) | |
at Object.console.warn (/var/runtime/LogPatch.js:76:27) |
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
git clone https://github.com/maasglobal/maas-tsp-example | |
cd maas-tsp-example | |
npm install | |
npm start |
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
zbctl --address $CONTACTPOINT_ADDRESS:443 status \ | |
--clientId $CLIENTID --clientSecret $CLIENTSECRET \ | |
create instance Process_1j8gwvl --variables '{ "name": "John" }' | |
{ | |
"workflowKey": 2251799813688076, | |
"bpmnProcessId": "Process_1j8gwvl", | |
"version": 1, | |
"workflowInstanceKey": 2251799813688081 | |
} |