Skip to content

Instantly share code, notes, and snippets.

View penguinbroker's full-sized avatar

Dave Lee penguinbroker

View GitHub Profile
@penguinbroker
penguinbroker / gist:1fde23ccf01adede6192
Last active August 29, 2015 14:18
clean up missing lessonSlides
val decks = Await.result(ComponentRegistry.slideDeckDao.tableScan, 100.seconds)
val lpms = Await.result(ComponentRegistry.lessonPublishableMediaDao.tableScan, 100.seconds)
val lessonSlides = Await.result(ComponentRegistry.lessonSlideDao.tableScan, 100.seconds)
val slides = Await.result(ComponentRegistry.slideDao.tableScan, 100.seconds)
slides map { slide =>
decks find (_.id == Some(slide.slideDeckId)) map { deck =>
if (deck.publishableMediaId != slide.publishableMediaId) {
println("found broken slide: " + slide.id)
val updatedSlide = slide.copy(publishableMediaId = deck.publishableMediaId)
@penguinbroker
penguinbroker / gist:80fc8cb0253d0961120a
Last active August 29, 2015 14:20
init pubnub channels
val users = Await.result(ComponentRegistry.institutionUserDao.tableScan, 100.seconds)
users map { user =>
if (user.pubnubAuthKey.isEmpty) {
println(s"updating user ${user.id}")
val updated = user.withAuthKey(echo360.util.IdGenerator.createUuid)
Await.result(ComponentRegistry.institutionUserDao.update(updated), 10.seconds)
Thread.sleep(10)
}
}
VideoPresentation(None,None,None,None,None)
CaptureEvent(Some(b916794a-8f92-474f-8d0b-c178b382988b),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.capturePublished,2015-08-01T21:27:06.410Z)
CaptureEvent(Some(d4fa045f-1a72-4cac-94d9-7550e90b6e37),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.contentUploadFinished,2015-08-01T21:27:06.575Z)
CaptureEvent(Some(4cf854e1-43a2-416b-be3d-9b93baad28f1),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.capturePublished,2015-08-01T21:27:07.256Z)
CaptureEvent(Some(40badefc-5f23-47fa-bc3f-95cb632f1fb0),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.processingFinished,2015-08-01T21:27:29.910Z)
CaptureEvent(Some(004b811e-4f76-4fdb-9c56-0991443129e0),46310481-059c-40fb-a31b-253fdf317bc8,CaptureEvent.capturePublished,2015-08-01T21:27:30.893Z)
VideoPresentation(None,None,None,None,None)
CaptureEvent(Some(777629a6-3f18-418e-8f5f-5621c460430c),3325d9a8-5748-450c-b017-1fb028d6ab0b,CaptureEvent.capturePublished,2015-08-01T15:31:38.643Z)
CaptureEvent(Some(d811e33c-8121-400
Raw Data Points
- lesson
- entered classroom
- time spent in classroom
- video playback
- visited
- player clicks
- heat maps
{
"type": "io.clause.latedelivery",
"forceMajeur": "except for Force Majeure cases, ",
"seller": "Seller",
"buyer": "Buyer",
"penaltyUnit": 2,
"penaltyPeriod": ["day"],
"penaltyPercentage": 0.105,
"fractional": {
"fractionalPeriod": "day",
{
"$class": "io.clause.latedeliveryandpenalty.LateDeliveryAndPenaltyRequest",
"forceMajeure": false,
"agreedDelivery": "2017-10-07T16:38:01.412Z",
"goodsValue": 200,
"transactionId": "402c8f50-9e61-433e-a7c1-afe61c06ef00",
"timestamp": "2017-11-12T17:38:01.412Z"
}
@penguinbroker
penguinbroker / cognito.yaml
Created January 18, 2019 00:47 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole: