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
# USE AT YOUR OWN RISK | |
# THIS IS FOR EXPERTS ONLY - KNOW WHAT YOU ARE DOING. | |
#Step 1: | |
Make sure old system and new system are running same OS | |
On both systems: | |
apt update | |
apt upgrade | |
#Step 2: |
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 Copy EC2 instance to Amazon Lightsail | |
WARNING - this is a guide to remind myself how to do it!!!! | |
WARNING - I'M NOT RESPONSIBLE FOR ANYTHING YOU DO WITH THIS! | |
WARNING - DON'T ASK ME ANY QUESTIONS ABOUT IT. | |
WARNING - THIS IS NOT A TUTORIAL - I'm typing this from memory. | |
These steps are a good approximation of what is needed but you'll | |
need strong tech skills to do this. Don't do it unless you know what you are doing. |
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", |