Skip to content

Instantly share code, notes, and snippets.

View susanBuck's full-sized avatar

Susan Buck susanBuck

View GitHub Profile
@susanBuck
susanBuck / C:\xampp\mysql\bin\my.ini
Last active April 23, 2024 19:08
Working MySQL config file for XAMPP
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
@susanBuck
susanBuck / weekX.md
Created April 15, 2024 16:34
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 / ini-diff.php
Last active April 10, 2024 13:44
Output the differences between two PHP config files (php.ini)
<?php
# REF:
# Nginx: https://codewithsusan.com/notes/upgrade-php-nginx
# Apache: https://codewithsusan.com/notes/upgrade-php-apache
# UPDATE THESE TWO PATHS:
$current = '/path/to/current/php.ini';
$previous = '/path/to/previous/php.ini';
@susanBuck
susanBuck / example.md
Created March 8, 2024 16:28
PSY1903 Markdown Example
@susanBuck
susanBuck / instructions.md
Last active March 4, 2024 00:07
How to reset `root` password in XAMPP MySQL

Open C:\xampp\mysql\bin\my.ini (MySQL config file)

Find the line [mysqld] and right below it add skip-grant-tables. Example:

# The MySQL server
[mysqld]
skip-grant-tables
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
@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 / .bash_aliases
Last active February 10, 2024 14:34
Bash Aliases
# Edit the bashrc file
alias configedit='code ~/.bashrc'
# Edit the alias config file
alias configalias='code ~/.bash_aliases'
# Recognize changes to bashrc config
# (which will also recognize changes to the alias config file)
alias configrefresh='source ~/.bashrc'
@susanBuck
susanBuck / .bash_profile
Last active February 10, 2024 14:33
.bash_profile example
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Suppress message about using zsh
export BASH_SILENCE_DEPRECATION_WARNING=1
@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;