Skip to content

Instantly share code, notes, and snippets.

View sudomann's full-sized avatar
🌆
Night Owl

Willy Njundong sudomann

🌆
Night Owl
View GitHub Profile
export default class ChoiceSetting {
static storageKey = undefined;
static label = undefined;
static defaultValue = undefined;
static set defaultValue(value) {
if (failsValidation(value))
throw new Error();
this.defaultValue = value;
}
@sudomann
sudomann / etl.js
Last active December 25, 2020 20:02
/**
* ETL function to gather all person type contacts from device
* @returns {Promise<{ name: string, nickname: string, maidenName: string, phoneNumbers: string[], emails: string[] }[]>} An promise resolved to an array of 0 or more transformed contacts
*/
export const extractAndTransformContacts = async () =>
Contacts.getContactsAsync({
fields: QUERY_FIELDS,
pageSize: 0,
}).then(({ data }) => {
const transformedContacts = produceContacts(data);
isEnabled = async () => {
console.log("isEnabled() running");
return SecureStore.getItemAsync(this._storageKey)
.then((value) => {
// no previously stored/specified value
if (value === null) Promise.reject();
return value === BooleanSetting.States.ON;
})
.catch(() => {
console.error("boolean seting isEnabled throwing :(");
> docker run -it alpine:latest sh
/ # apk add --update curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
(1/5) Installing ca-certificates (20191127-r5)
(2/5) Installing brotli-libs (1.0.9-r3)
(3/5) Installing nghttp2-libs (1.42.0-r1)
(4/5) Installing libcurl (7.76.1-r0)
(5/5) Installing curl (7.76.1-r0)
Executing busybox-1.32.1-r6.trigger
On yupprotocol.org:
- Yup Racing tile is set to snap to an id that does not exist on the page - but the content is there
On app.yup.io:
- The extention button in the side menu takes you to the chrome webstore no matter what browser you're using
- I don't know enough about UX to say this is a bad thing, but I'm curious, why are the navigation menus on yup.io and app.yup.io on opposite sides
- rendering performance in chromium browsers is about okay, but gets worse in FF
- There is a log out button available (which appears to do nothing) at the same time as a sign up/login button
General:
services:
init_ensure_models:
image: alpine:latest
volumes:
- ./worker/models:/worker/models
entrypoint: >
/bin/sh -c "
if [ ! -f /worker/models/nlp/my_model.gguf ]; then
echo 'Downloading models...';
mkdir -p /worker/models/nlp/ &&