Skip to content

Instantly share code, notes, and snippets.

View briancarycom's full-sized avatar

Brian Cary briancarycom

View GitHub Profile
@briancarycom
briancarycom / check_statuses.rb
Last active April 30, 2020 18:34
[User course status reset contention check] Determine if completions occurred before reset occurred #standard #course_reset #cleanup
# TODO:
# populate module IDs for current courses
# need to update course schema to support module_ids!
# TODO:
# try going through active curriculum teams
@briancarycom
briancarycom / notes.txt
Created April 30, 2020 00:35
[Undo git commit] Soft and hard delete git commits #git
https://stackoverflow.com/questions/927358/how-do-i-undo-the-most-recent-local-commits-in-git
How to undo a local commit
git reset --soft HEAD^ # Use --soft if you want to keep your changes
git reset --hard HEAD^ # Use --hard if you don't care about keeping the changes you made
How to undo a public commit
@briancarycom
briancarycom / steps.txt
Created April 30, 2020 18:34
[Worklete Google config] Oauth setup for local dev #standard
heroku config -a worklete | grep GOOGLE
GOOGLE_CLIENT_SECRET=...
GOOGLE_CLIENT_ID=...
put those in .env
then docker-compose up
@briancarycom
briancarycom / notes.txt
Created May 18, 2020 23:33
[Mobile app notes] Notes 5/18/20 #dev #react #graphql
https://stackoverflow.com/questions/37397886/get-graphql-whole-schema-query
# install via NPM
npm install -g graphql-cli
# Setup your .graphqlconfig file (configure endpoints + schema path)
graphql init
@briancarycom
briancarycom / notes.rb
Last active May 5, 2022 19:35
bandit courses - public
# INSTRUCTIONS
# 1. Work on each row at a time from this spreadsheet:
# https://docs.google.com/spreadsheets/d/1Hlp36XmLTR7MUW7Bgu8OAsALlvdmjbq1nxsnmTF6t_0/edit?usp=sharing
# 2. For each row, open up the corresponding file:
# i.e. for row 2: Power Stance, Day 1, open the file named: power_stance_day1_english.rb
# 3. For each step in the corresponding language file, use the template below for each STEP TYPE
# i.e. Video, Video, Step-by-step would have 3 steps:
# CourseVideoPlayerScreen, CourseVideoPlayerScreen, CourseStepScreen
# 4. Chain the steps together, making sure NEXT goes to the next step, i.e. step1 goes to step2, and so on.
@briancarycom
briancarycom / unassign_course.rb
Created July 8, 2022 18:13
last course push needs to be removed
require 'litmos/loader'
require 'slack_notifier'
la = LitmosAccount.find ""
loader = Litmos::Loader.new(la)
lai = LitmosAccountInfo.new
account_key = lai.get_account_key(la.id)
bad_push = la.course_pushes.order(created_at: :desc).first
cas = bad_push.results
cas['team_courses'].each do |ca|
@briancarycom
briancarycom / notes.rb
Last active October 18, 2022 16:22
patch primo team course assignment
la = LitmosAccount.find "2d5eab24-a417-4daa-8213-23666cc19d2d"
t = Team.find "c6ba206e-506e-4d8b-812a-0200130baabe"
# delivery
ct = Team.find "ce4255cd-3eeb-4dbb-ad50-ca32295d2a51"
# sales
@briancarycom
briancarycom / notes.json
Created November 4, 2022 18:07
course push calendar
{
"parent_teams": [
{
"name": "DCM",
"id": "1235",
"assignments": [
{"name": "Delivery", "id": "4561", "next_course_id": "789"},
{"name": "Delivery", "id": "4562", "next_course_id": "789"},
{"name": "Delivery", "id": "4563", "next_course_id": "789"},
{"name": "Warehouse", "id": "1436", "next_course_id": "886"},