Skip to content

Instantly share code, notes, and snippets.

View susanBuck's full-sized avatar

Susan Buck susanBuck

View GitHub Profile
@susanBuck
susanBuck / index-view.php
Last active October 13, 2023 15:52
War Card Game
<!doctype html>
<html lang='en'>
<head>
<title>War (card game) Simulator</title>
<meta charset='utf-8'>
<style>
.card {
border: 1px solid black;
@susanBuck
susanBuck / index-view.php
Created October 13, 2023 02:36
Example for nolinanna
<h2>Results</h2>
<ul>
<?php foreach($results as $player => $result) { ?>
<li><?php echo $player ?></li>
<ul>
<?php for($i = 1; $i <= 3; $i++) { ?>
<li>
Turn <?php echo $i; ?>:
Rolled <?php echo implode(', ', $result['turn'.$i]) ?>
@susanBuck
susanBuck / card-deal.php
Created October 2, 2023 01:36
card-deal.php
<?php
$cards = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
shuffle($cards);
$playerCards = [];
$computerCards = [];
@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 / uninstall-mysql.md
Created June 8, 2023 15:38
Uninstall MySQL (Ubuntu)
@susanBuck
susanBuck / AppController.php
Created March 27, 2023 15:46
Notes for Steph
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Symfony\Component\Translation\Provider\NullProvider;
class AppController extends Controller
{
public function index()
@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 / error output
Created May 9, 2022 14:41
error output
<!doctype html>
<html lang='en'>
<head>
<title> Create a Parking Ticket
</title>
<meta charset='utf-8'>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
@susanBuck
susanBuck / styles.css
Last active May 6, 2022 20:28
FlashWord starting CSS
[v-cloak] {
display: none;
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: black;
@susanBuck
susanBuck / migrate.sh
Last active March 8, 2022 20:28
Server migration script
#!/bin/bash
main() {
do_swap
do_instructor_server_access
do_aliases
do_composer
do_github
do_modules
do_repository