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
  • 13:47 (UTC -07:00)
View GitHub Profile
@nucleogenesis
nucleogenesis / gist:16b8650cf68b6983a030dd33a21d4e52
Created June 7, 2017 22:27
Magento 2 Default Product Creation API JSON Schema
{
"product": {
"id": 0,
"sku": "string",
"name": "string",
"attributeSetId": 0,
"price": 0,
"status": 0,
"visibility": 0,
"typeId": "string",
{
"id": "43486",
"title": "Curried Salmon Bake",
"description": "",
"meal_type": "",
"prep_time": "0",
"cook_time": "0",
"cooked": "0",
"liked": "0",
"avoid": "0",
Slideshow: {
title: string,
metadata: { ... metadata information ... },
author/user_id: uuid,
images: [
{
path: string,
caption: string
}
]
@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,
#!/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 / 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.

https://github.com/learningequality/kolibri-instant-schools-plugin/archive/v0.12.9-beta12.zip
@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

@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.
from kolibri.core.auth.models import FacilityUser, Facility, Role
from faker import Faker
"""
pip install Faker if you don't have it
"""
FAKE = Faker()
"""