type ScaleSurveyQuestion = {
id: string;
question: string;
type: 'multiple-choice'
choices: Array<{label: string; answer: string}>;
};
type FreeformSurveyQuestion = {
id: string;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint node:true */ | |
/* eslint-env node */ | |
/* | |
* This will look at the current version of all of your dependencies and update your package.json | |
* with the specific version that you currently have in node_modules. This will save you from the | |
* sadness that is: DEPENDENCY MANAGEMENT | |
* | |
* Place this file in a folder that's a a sibling to your package.json and node_modules | |
* Then simply run: node scripts/package-strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getWatchers(root) { | |
root = angular.element(root || document.documentElement); | |
var watcherCount = 0; | |
function getElemWatchers(element) { | |
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
var watchers = scopeWatchers.concat(isolateWatchers); | |
angular.forEach(element.children(), function (childElement) { | |
watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var colors = [ | |
'rgb(30, 104, 35)', 'rgb(68, 163, 64)', 'rgb(140, 198, 101)', 'rgb(214, 230, 133)', 'rgb(238, 238, 238)' | |
]; | |
var days = $('#calendar-graph').find('rect.day'); | |
days.css({ | |
fill: colors[4] | |
}); | |
days.on('click', function(e) { | |
e.stopPropagation(); | |
$this = $(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a React context Provider/Consumer pair that | |
// validates the consumer is rendered within a provider | |
function createRequiredContext(name) { | |
const Context = React.createContext() | |
function Consumer(props) { | |
return ( | |
<Context.Consumer {...props}> | |
{val => { | |
if (!val) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dotenv/config.js' | |
import chromadb from 'chromadb' | |
import { RetrievalQAChain } from 'langchain/chains' | |
import { ChatOpenAI } from 'langchain/chat_models/openai' | |
import { OpenAIEmbeddings } from 'langchain/embeddings/openai' | |
import { Chroma } from 'langchain/vectorstores/chroma' | |
const { OpenAIEmbeddingFunction, ChromaClient } = chromadb | |
const COLLECTION_NAME = 'test-collection' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/full-stack-testing/exercises__sep__11.finish__sep__01.solution.finished/rbb60w04h7/.env var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/full-stack-testing/exercises__sep__11.finish__sep__01.problem.finished/rbb60w04h7/.env | |
index d049969..4ac848d 100644 | |
--- var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/full-stack-testing/exercises__sep__11.finish__sep__01.solution.finished/rbb60w04h7/.env | |
+++ var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/full-stack-testing/exercises__sep__11.finish__sep__01.problem.finished/rbb60w04h7/.env | |
@@ -1,2 +1,6 @@ | |
DATABASE_URL="file:./data.db" | |
SESSION_SECRET="super-duper-s3cret" | |
+RESEND_API_KEY="some-secret-key" | |
+GITHUB_TOKEN="MOCK_abc12392lfkjlsf0" | |
+GITHUB_CLIENT_ID="MOCK_Iv1.abc12392lfkjlsf0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const sessionKey = 'sessionId' | |
export const authenticator = new Authenticator<string>(sessionStorage, { | |
sessionKey, | |
}) | |
authenticator.use( | |
new GitHubStrategy( | |
{ | |
clientID: process.env.GITHUB_CLIENT_ID, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/data-modeling/exercises__sep__01.init__sep__01.problem.named/39yuovg9r3j/app/root.tsx var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/data-modeling/exercises__sep__09.finished__sep__01.problem/39yuovg9r3j/app/root.tsx | |
index 7dee21b..6c3aa4b 100644 | |
--- var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/data-modeling/exercises__sep__01.init__sep__01.problem.named/39yuovg9r3j/app/root.tsx | |
+++ var/folders/kt/zd3bfncd0c3gjx25hbcq483c0000gn/T/kcdshop/diff/data-modeling/exercises__sep__09.finished__sep__01.problem/39yuovg9r3j/app/root.tsx | |
@@ -104,7 +104,6 @@ export const meta: V2_MetaFunction = () => { | |
{ name: 'description', content: `Your own captain's log` }, | |
] | |
} | |
-// change | |