Skip to content

Instantly share code, notes, and snippets.

View susanBuck's full-sized avatar

Susan Buck susanBuck

View GitHub Profile
@susanBuck
susanBuck / conditions
Last active August 5, 2024 18:25
Example IAT conditions array
[
{
"categories": [
"family",
"career"
],
"trial": [
{
"word": "resume",
"category": "career"
@susanBuck
susanBuck / iat-conditions.js
Last active November 11, 2024 16:00
iat.conditions.js
// Modify the following `blocksA`, `blocksB`, and `words` arrays with appropriate values for your experiment
let blocksA = [
['men', 'women'],
['family', 'career']
];
let blocksB = [
['family or men', 'career or women'],
['family or women', 'career or men']
];
@susanBuck
susanBuck / ShopifyController.php
Created May 29, 2024 16:39
Examples for Jason
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use PHPShopify\ShopifySDK;
class ShopifyController extends Controller
{
/**
@susanBuck
susanBuck / weekX.md
Last active October 15, 2024 03:34
Outside Resources Log

Outside Resources Log - Week X

AI Prompts

As a bulleted list, record any questions/prompts you put into an AI program this week to help with material in this course. You do not have to include the AI response, just your prompt. If you did not use AI this week, simply note "None". Remove these instructions in your submission.

Outside Sites

As a bulleted list, record any outside sites you referenced this week. You should exclude any resources/links that were provided in the course material. If you did not use any outside sites this week, simply note "None". Remove these instructions in your submission.

@susanBuck
susanBuck / example.md
Created March 8, 2024 16:28
PSY1903 Markdown Example
@susanBuck
susanBuck / output.txt
Created March 2, 2024 14:01
Error output of basic PsychoPy script after installing via "Anaconda and Miniconda" instructions
objc[34942]: Class wxNSAppController is implemented in both /Users/Susan/miniconda3/envs/psychopy/lib/libwx_osx_cocoau_core-3.2.0.dylib (0x104fd1a78) and /Users/Susan/miniconda3/envs/psychopy/lib/libwx_osx_cocoau_core-3.2.0.2.1.dylib (0x1104f1a78). One of the two will be used. Which one is undefined.
objc[34942]: Class ModalDialogDelegate is implemented in both /Users/Susan/miniconda3/envs/psychopy/lib/libwx_osx_cocoau_core-3.2.0.dylib (0x104fd1aa0) and /Users/Susan/miniconda3/envs/psychopy/lib/libwx_osx_cocoau_core-3.2.0.2.1.dylib (0x1104f1aa0). One of the two will be used. Which one is undefined.
objc[34942]: Class wxNSApplication is implemented in both /Users/Susan/miniconda3/envs/psychopy/lib/libwx_osx_cocoau_core-3.2.0.dylib (0x104fd1af0) and /Users/Susan/miniconda3/envs/psychopy/lib/libwx_osx_cocoau_core-3.2.0.2.1.dylib (0x1104f1af0). One of the two will be used. Which one is undefined.
objc[34942]: Class wxCPWCDelegate is implemented in both /Users/Susan/miniconda3/envs/psychopy/lib/libwx_osx_cocoau_co
@susanBuck
susanBuck / laravel-subdirectory.conf
Last active February 16, 2024 21:19
Run Laravel via subdirectories on a Nginx server
# ⭐⭐⭐
# Video explanation: https://youtu.be/SkpgZXDUHio
# Notes: https://codewithsusan.com/notes/run-laravel-apps-via-subdirectories-nginx
# ⭐⭐⭐
server {
# Listen for incoming requests on port 80 (default for HTTP traffic)
listen 80;
# Also listen on port 80 but for IPv6 connections
@susanBuck
susanBuck / dompdf-stream-fix.php
Created February 1, 2024 15:51
Fix for Dompdf downloading instead of streaming to the browser
<?php
/**
Fix for Dompdf downloading instead of streaming to the browser
⭐ Video guide: https://youtu.be/ktOoBDSFTgI ⭐
**/
require 'vendor/autoload.php';
use Dompdf\Dompdf;
@susanBuck
susanBuck / EmailDemoController.php
Last active February 1, 2024 15:48
Send emails in Laravel without a Mailable class
<?php
/**
How to send emails in Laravel without using a Mailable class. Includes raw plain text emails, HTML emails, and emails generated from Blade View files.
⭐ Video how-to: https://youtu.be/FFFqbvNGptc ⭐
Full reference: https://codewithsusan.com/notes/laravel-email-without-mailable-class
*/
namespace App\Http\Controllers;
@susanBuck
susanBuck / database-test.php
Last active January 5, 2024 00:57
PHP database connection test
<?php
# Basic PHP code to test a connection with a MySQL database
# https://codewithsusan.com
# https://www.youtube.com/channel/UCLyz8iEvzxyhKEBzOTs6bJQ
# Set up all the variables we need to make a connection
$host = '127.0.0.1'; # Common hosts for local servers include '127.0.0.1' or 'localhost'
$database = 'demo';
$username = 'root';