Skip to content

Instantly share code, notes, and snippets.

View susanBuck's full-sized avatar

Susan Buck susanBuck

View GitHub Profile
@susanBuck
susanBuck / weekX.md
Last active May 17, 2024 01:48
Weekly Log Template

Week X

Summarize

In your own words, summarize what you learned in this course this week.

Needs work

Briefly outline any topics/material you still feel "fuzzy" on.

@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';
@susanBuck
susanBuck / youtube-oauth-connection.php
Last active December 29, 2023 17:17
YouTube API & PHP - OAuth Connection (google-api-php-client)
<?php
/*
⭐⭐⭐
YouTube video that covers all the details of this code:
https://youtu.be/PO1UOIMW-AE
Written guide:
https://codewithsusan.com/notes/youtube-api-php-oauth-connection
⭐⭐⭐
@susanBuck
susanBuck / index.php
Created November 9, 2023 03:39
Example for dpurser-dev
<?php
session_start();
# Check if a game is in progress
if (!isset($_SESSION['game_board'])) {
# If not, set up a new game board
$_SESSION['game_board'] =
array(
array(0,0,0),
@susanBuck
susanBuck / index-view.php
Created November 1, 2023 01:48
Example for alilienfeld
<!DOCTYPE html>
<html lang="en">
<head>
<title>Project 2 High or Low</title>
<link href='/styles.css' rel='stylesheet'>
</head>
<body>
<h2>Instructions</h2>