Skip to content

Instantly share code, notes, and snippets.

View susanBuck's full-sized avatar

Susan Buck susanBuck

View GitHub Profile
@susanBuck
susanBuck / consent.txt
Last active October 28, 2025 20:02
Experiment Consent Screen
@susanBuck
susanBuck / app.js
Created September 16, 2025 18:10
Week 3 Task Set Tips
// Select the elements on the page we will alter
let num1Span = document.getElementById('num1');
let num2Span = document.getElementById('num2');
// Example numbers
let num1 = 5;
let num2 = 9;
// Update the elements on the page with the example numbers
num1Span.innerHTML = num1;
@susanBuck
susanBuck / example.js
Created September 9, 2025 16:38
Note on capturing responses with the prompt method and reusing variables
// Don’t redeclare the same variable:
let answer = prompt('What is 1 + 1?');
console.log('You answered: ' + answer);
let answer = prompt('What is 4 + 8?');
console.log('You answered: ' + answer);
// Instead do this:
@susanBuck
susanBuck / employee_survey.csv
Last active January 29, 2026 01:27
employee_survey.csv
We can't make this file beautiful and searchable because it's too large.
Emp ID,satisfaction_level,last_evaluation,number_project,average_montly_hours,time_spend_company,Work_accident,promotion_last_5years,dept,salary
1,0.38,0.53,2,157,3,0,0,sales,low
2,0.8,0.86,5,262,6,0,0,sales,medium
3,0.11,0.88,7,272,4,0,0,sales,medium
4,0.72,0.87,5,223,5,0,0,sales,low
5,0.37,0.52,2,159,3,0,0,sales,low
6,0.41,0.5,2,153,3,0,0,sales,low
7,0.1,0.77,6,247,4,0,0,sales,low
8,0.92,0.85,5,259,5,0,0,sales,low
9,0.89,1,5,224,5,0,0,sales,low
## Basic text formatting
**This text is bold - it must be important**
_This text is italicized; you should probably pay attention to it..._
[Click this link to learn about jsPsych...](https://www.jspsych.org)
Lists are created using asterisks or plus signs:
+ Item 1
@susanBuck
susanBuck / consent-screen
Created November 5, 2024 01:52
Consent Screen
@susanBuck
susanBuck / conditions.js
Last active September 29, 2025 15:29
conditions.js for Math Response Time w/ Blocks
let conditions = [];
for (let i = 0; i < 3; i++) {
let numbers = [];
// FYI: When using a nested numerical for loop, it’s common practice
// to use "j" as the iterator variable in the inner loop since "i" is already being
// used as the iterator variable in the outer for loop
for (let j = 0; j < 3; j++) {
@susanBuck
susanBuck / template.html
Created September 9, 2024 17:32
HTML template
<!doctype html>
<html lang='en'>
<head>
<title></title>
<meta charset='utf-8'>
<link href=data: , rel=icon>
</head>
<body>
</body>
@susanBuck
susanBuck / conditions
Last active August 7, 2024 18:01
Example EST conditions array
[
{
"block": "practice",
"trials": [
{
"word": "crumb",
"color": "red",
"isNeutral": true
},
{