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
SELECT | |
createdat, | |
REPLACE(CAST (default_renderid AS TEXT), '-', '') as default_renderid, | |
paintbox_name, | |
teamname, | |
description, | |
title | |
FROM render_templates |
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
refer here: | |
https://www.bennadel.com/blog/3590-you-can-safely-apply-object-spread-to-null-and-undefined-values-in-typescript-3-2-4.htm | |
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 React, {useState, useEffect, useMemo} from "react"; | |
import styled, {keyframes} from "styled-components"; | |
import {toast} from "react-toastify"; | |
import {CloseIcon} from "../Icons"; | |
import {doFetch} from "../../utils"; | |
import {Button as BSButton} from 'react-bootstrap'; | |
import PhoneInput from 'react-phone-number-input' | |
import 'react-phone-number-input/style.css' | |
import {debounce} from "lodash"; |
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 React, {useState, useEffect, useMemo} from "react"; | |
import styled, {keyframes} from "styled-components"; | |
import {toast} from "react-toastify"; | |
import {CloseIcon} from "../Icons"; | |
import {doFetch} from "../../utils"; | |
import {Button as BSButton} from 'react-bootstrap'; | |
import PhoneInput from 'react-phone-number-input' | |
import 'react-phone-number-input/style.css' | |
import {debounce} from "lodash"; |
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
From: https://superuser.com/questions/1187633/how-to-debug-systemd-networkd | |
From https://coreos.com/os/docs/latest/network-config-with-networkd.html : | |
Enable debugging manually | |
mkdir -p /etc/systemd/system/systemd-networkd.service.d/ | |
Create Drop-In /etc/systemd/system/systemd-networkd.service.d/10-debug.conf with following content: | |
[Service] | |
Environment=SYSTEMD_LOG_LEVEL=debug | |
And restart systemd-networkd service: |
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
andrewstuart@homecloud:~$ for file in /etc/systemd/network/*; do echo $file; cat $file; done | |
/etc/systemd/network/31-tap1.netdev | |
[NetDev] | |
Description="This is a tap device for a VM or a container" | |
Name=tap1 | |
Kind=tap | |
[Tap] | |
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
#!/usr/bin/python3 | |
import atexit | |
# sudo apt install python3-gpiozero | |
import gpiozero | |
import math, sys, os, time | |
import subprocess | |
import time | |
from threading import Timer | |
from os import listdir | |
from os.path import isfile, join |
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 React from 'react' | |
type Props = { | |
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void; | |
color?: string; | |
hoverColor?: string; | |
width?: number; | |
height?: number; | |
} |
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
/* | |
// how to find out what is causing renders | |
const renderCount = useRef<number>(0) | |
const prev_getStateMachineNewState = useRef<any>() | |
const prev_getAjaxRequestCache = useRef<any>() | |
const prev_getApplicationState = useRef<any>() | |
const prev_getFormErrorData = useRef<any>() | |
log(`getFormErrorData ${(prev_getFormErrorData.current !== getFormErrorData) ? "changed" : "not changed"}`) | |
log(`getAjaxRequestCache ${(prev_getAjaxRequestCache.current !== getAjaxRequestCache) ? "changed" : "not changed"}`) |
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 React, {useState, useEffect, useContext} from 'react'; | |
import {StateContextApplication} from "./StateContextApplication"; | |
let booleanAttributes = [ | |
"allowfullscreen", | |
"allowpaymentrequest", | |
"async", | |
"autofocus", | |
"autoplay", | |
"checked", |