Skip to content

Instantly share code, notes, and snippets.

View nucleogenesis's full-sized avatar
🏠
Working from home

Jacob Pierce nucleogenesis

🏠
Working from home
  • Learning Equality
  • Bakersfield, CA
  • 03:41 (UTC -07:00)
View GitHub Profile
const store = {
getters: {
isUserLoggedIn: true,
facilities: ['a','b'],
facilityId: 1,
selectedFacility: 1,
}
}
const hasMultipleFacilities = context => context.facilities.length > 1;
@nucleogenesis
nucleogenesis / machine.js
Last active May 28, 2021 23:01
Generated by XState Viz: https://xstate.js.org/viz
const store = {
getters: {
isUserLoggedIn: true,
facilities: ['a','b'],
facilityId: 1,
selectedFacility: 1,
}
}
const hasMultipleFacilities = context => context.facilities.length > 1;
@nucleogenesis
nucleogenesis / KIconDebug.vue
Created June 23, 2020 23:50
KIconDebug.vue
<template>
<div class="screen-owner" style="position: fixed; top: 0; overflow-y:scroll; left: 0; right: 0; bottom: 0; height: 100vh; width: 100vw; background: white; padding: 12.5%; z-index: 9999;">
<h1> Icons </h1>
<KGrid>
<KGridItem
v-for="aliases in blackIcons"
:key="aliases[0]"
:layout4="{ span: 2 }"
:layout8="{ span: 4 }"
from kolibri.core.auth.models import FacilityUser, Facility, Role
from faker import Faker
"""
pip install Faker if you don't have it
"""
FAKE = Faker()
"""
@nucleogenesis
nucleogenesis / gist:c5feee1007417e6fd68c825366d180e5
Created February 26, 2020 18:15
Vodafone Instant Schools - Monthly Maintenance Checklist
Please ensure that the following items are checked and verified to be working as expected once per month.
- [] The Instant Schools server is up and running as expected.
- [] The Instant Schools server is accessible over the Vodafone network.
- [] The Instant Schools server is accessible over the public internet.
- [] Verify that there is at least 1GB of disk space available on the server where Kolibri and/or nginx logs are generated.
@nucleogenesis
nucleogenesis / svg-inlining.md
Last active February 12, 2020 19:40
SVG Inline Consolidation Overview

SVG Inlining Prototype

Overview

To implement this consistently I added the SVG files folder from this repository: https://github.com/material-icons/material-icons directly to our kolibri-components package in Kolibri. This gives the kolibri-components package a reliable place from which to read the SVGs when used across products.

The other primary change is to use the file-svg directive provided by the svg-icon-inline-loader package here.

SVG Icon Names

https://github.com/learningequality/kolibri-instant-schools-plugin/archive/v0.12.9-beta12.zip
@nucleogenesis
nucleogenesis / crowdin.md
Last active July 31, 2019 21:49
Using CSV with Crowdin & Managing Context

Crowdin - Moving to CSV from JSON

Definitions

Identifier - Refers to a Namespace.key combination such as UserTable.headingLabel or SignInPage.userName. Crowdin sees this sort of as a UID for a translation.

Source string - Refers to the string of text, particularly the English string of text, that is defined in Kolibri in relation to a specific Identifier. For example, the UserTable.headingLabel identifier could refer to the Source string "Users".

Context string - Refers to text added in the Crowdin UI by someone. This is used to give translators meaningful context for a string that might not be obvious just by seeing the Source string.

#!/usr/bin/env python
from ricecooker.chefs import SushiChef
from ricecooker.classes.nodes import TopicNode, DocumentNode, SlideshowNode
from ricecooker.classes.files import DocumentFile, SlideImageFile
from ricecooker.classes.licenses import get_license
class SimpleChef(SushiChef):
channel_info = {
'CHANNEL_TITLE': 'Learning Equality Slideshow Demo',
'CHANNEL_SOURCE_DOMAIN': 'LE',
@nucleogenesis
nucleogenesis / gist:20fbddf5d3d9035c3acee2674bf4ae00
Created April 8, 2019 20:23
Tentatively Expected Serialized Return for Slideshow
Slideshow: {
title:string,
changed:bool,
id: UUID,
description:string,
sort_order:int,
author:string,
copyright_holder:string,
license:int,
language:string,