Skip to content

Instantly share code, notes, and snippets.

View seejee's full-sized avatar

Chris Geihsler seejee

View GitHub Profile
@seejee
seejee / cat-fact.js
Created November 12, 2020 17:26
Actions examples
const axios = require('axios');
/** @type {PostLoginAction} */
module.exports = async (event, context) => {
if(!event.user.userMetadata.catFact) {
const response = await axios.get('https://cat-fact.herokuapp.com/facts/random');
console.log("HI!")
return {
<table>
<thead><tr><td>Total</td><td>Chant</td><td>Effect</td></tr></thead>
<tr><td>1</td><td>AH AH</td><td> The Stainless Sky</td></tr>
<tr><td>2</td><td>AH RA</td><td> The Flaming Rays of the Sun</td></tr>
<tr><td>3</td><td>AH PA</td><td> The Nectar Rays of the Moon</td></tr>
<tr><td>4</td><td>AH TSA</td><td> The Bright Star</td></tr>
<tr><td>5</td><td>AH NA</td><td> The Ground of Gold</td></tr>
<tr><td>6</td><td>AH DHI</td><td> The Tone of Vajras</td></tr>
<tr><td>7</td><td>RA AH</td><td> The Bright Lamp</td></tr>
<tr><td>8</td><td>RA RA</td><td> Adding Butter to the Burning Flames</td></tr>
/lti/mb68hxyyac9s1zcvwre41hmllft2hrzz75v1im2iisr3inwx/dzhoQ6K
@seejee
seejee / state-in-action.js
Last active October 27, 2017 17:54
new reducer thingy
// action
export function onContentChange(contentState) {
return async (dispatch, getState) => {
const { type: assignmentType, drafts } = getState().studentAssignment;
const { isEnabled: isProofreadEnabled } = getState().proofread;
const { hasEssayReachedMinimumLength } = getState().writingSpace;
const length = draftLength(contentState);
@seejee
seejee / a.js
Last active June 30, 2017 12:45
const ExpansionPack = {
isTurnInButtonVisible: () => true,
isSignalCheckEnabled: () => false,
isPrewritingEnabled: () => false,
saveDraftButtonLabel: () => "Save Draft"
}
const SignalCheck = {
isTurnInButtonVisible: (state) => state.assignment.drafts.length > 0,
isSignalCheckEnabled: () => true,
https://pink-lti.revisionassistant.com/frap/#/lti/6141aa6709ec0dfba949a81e6d405b320caedf53/1980

Tips for giving a good sprint demo

Sprint demos are our team's opportunity to demonstrate progress to the rest of the company, answer questions about new features, and solicit feedback to improve the product. Giving a clear demo is an important part of that process. Here are some tips to effectively demonstrate a new product feature.

  • Spend some time preparing for your demo.
    • Practice what you're going to say and walk through the demo at least once prior to the sprint demo.
  • Think about what questions the audience might have and be prepared to answer them.
@seejee
seejee / instructions.md
Last active January 19, 2017 16:30
Database cutover instructions

Prep the new Heroku database

  • Add a Standard-4 Postgres database to the jetpack-prod Heroku app
  • Wait for it to initialize
  • heroku pg:psql -a jetpack-prod
  • CREATE EXTENSION hstore;
  • Take note of the new DATABASE_URL

Put the site in maintenance mode and shut down all servers

TTM Data Model Limitations

This document describes some limitations in TTM's data model that might complicate integrations with other system.

Globally unique student usernames

Student usernames in TTM must be globally unique. So, if TTM must accept student usernames from a 3rd party system, they may conflict with a user in a completely different district.

[#<SyncBatchEntry:0x007fec3af73888
id: 1,
sync_batch_id: 1,
entry_type: "action",
associated_entities: nil,
created_at: Tue, 24 May 2016 20:18:12 UTC +00:00,
updated_at: Tue, 24 May 2016 20:18:12 UTC +00:00,
started_at: Tue, 24 May 2016 20:18:12 UTC +00:00,
finished_at: Tue, 24 May 2016 20:18:12 UTC +00:00,
entry: