Skip to content

Instantly share code, notes, and snippets.

View nastanford's full-sized avatar
🏠
Busy Coding

Nathan Stanford Sr nastanford

🏠
Busy Coding
  • Harrington, Delaware
View GitHub Profile
@nastanford
nastanford / clean_code.md
Created October 27, 2023 20:42 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@nastanford
nastanford / Post10-21-2023-1.htm
Created October 22, 2023 00:24
NathanStanford.name Post 10-21-2023 1
<form hx-post="/api/form"
hx-trigger="submit">
<input type="text"
name="username"
placeholder="Enter your username">
<button type="submit">Submit</button>
</form>
Available commands:
clear-compiled Remove the compiled class file
down Put the application into maintenance mode
env Display the current framework environment
help Displays help for a command
inspire Display an inspiring quote
list Lists commands
migrate Run the database migrations
optimize Cache the framework bootstrap files
serve Serve the application on the PHP development server
@nastanford
nastanford / README.md
Created October 18, 2022 21:07 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@nastanford
nastanford / index.html
Created April 15, 2022 12:51
JavaScript Drag & Drop
<h1>10 Richest People</h1>
<p>Drag and drop the items into their corresponding spots</p>
<ul class="draggable-list" id="draggable-list"></ul>
<button class="check-btn" id="check">
Check Order
<svg viewBox="0 0 24 24">
<line x1="22" y1="2" x2="11" y2="13"></line>
@nastanford
nastanford / fetch-api-examples.md
Created October 4, 2021 22:22 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@nastanford
nastanford / 1-Laravel.md
Last active September 6, 2021 15:32
Tips for Laravel

Laravel - PHP

IDE Suggested

  • Visual Studio Code - VSCode
  • PHPStorm
  • Laravel Breeze
  • Bootstrap 5
  • Tailwind CSS

Prerequisites

@nastanford
nastanford / php-artisan-make-view.php
Created August 19, 2021 19:26
How to add the ability to create a view to a Laravel PHP Artisan command.
How to add the ability to create a view to a Laravel PHP Artisan command.
In Command Line Run:
composer require theanik/laravel-more-command --dev
php artisan make:view {view-name}
php artisan make:view {subfolder}/{view-name}=
@nastanford
nastanford / README.md
Created April 11, 2018 14:45 — forked from kerryboyko/README.md
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.