I hereby claim:
- I am ariesmcrae on github.
- I am aries (https://keybase.io/aries) on keybase.
- I have a public key whose fingerprint is 8DC0 BF59 ACB5 5CC5 BF41 2E35 5C94 7AC4 1E65 49C2
To claim this, I am signing this object:
private static <T extends Enum<T>> boolean isInputInTheList(T input, List<? extends Enum<?>> list) { | |
return Optional.ofNullable(list) | |
.map(Collection::parallelStream) | |
.orElseGet(Stream::empty) | |
.anyMatch(x -> input!= null && ((Enum) x).name().equals(input.name())); | |
} | |
// or for the longer version | |
private static <T extends Enum<T>> boolean isInputInTheList(T input, List<? extends Enum<?>> list) { |
interface ConfigDto extends Record<string, unknown> {} | |
const myConfigDto: ConfigDto = { | |
baseUrl: "http://test.com", | |
refershRateInSeconds: 2, | |
otherStuff: {a: "a", b: "b"}, | |
showSpinner: true, | |
} | |
console.log(JSON.stringify(myConfigDto, null, 2)) |
// I was getting this error when publishing sns from my local laptop: | |
// arn:aws:sns:ap-southeast-2:396497070286:int-afl-sns-topic | |
// Inaccessible host: `sns.ap-southeast-2.amazonaws.com'. | |
// This service may not be available in the `ap-southeast-2' region.", | |
// "code":"UnknownEndpoint", | |
// "region":"ap-southeast-2", | |
// "hostname":"sns.ap-southeast-2.amazonaws.com" | |
// getaddrinfo ENOTFOUND sns.ap-southeast-2.amazonaws.com | |
// This is the solution |
I hereby claim:
To claim this, I am signing this object:
class Logger { | |
public error(msg: string, exception: Error): void { | |
console.error(msg, exception); | |
} | |
} | |
const instance = new Logger(); | |
// Prevent modification to properties and values of the object. |
#include <M5Core2.h> | |
#include <M5_ENV.h> | |
SHT3X sht30; | |
float temperature = 0.0; | |
float humidity = 0.0; | |
void setup() { | |
M5.begin(); // Init M5Core2. |
#include "thingProperties.h" | |
// M5Unit-ENV - Version: 0.0.6 | |
#include <M5_ENV.h> | |
SHT3X sht30; | |
void setup() { | |
Wire.begin(); // Wire init, adding the I2C bus. |
from m5stack import * | |
from m5stack_ui import * | |
from uiflow import * | |
import time | |
import unit | |
from IoTcloud.AWS import AWS | |
import json | |
screen = M5Screen() | |
screen.clean_screen() |
from m5stack import * | |
from m5ui import* | |
from uiflow import * | |
import time | |
import unit | |
from IoTcloud.AWS import AWS | |
import json | |
setScreenColor(0x111111) |
nvm ls-remote
nvm install v16.17.1
nvm use v16.17.1