Skip to content

Instantly share code, notes, and snippets.

View nastanford's full-sized avatar
🏠
Busy Coding

Nathan Stanford Sr nastanford

🏠
Busy Coding
View GitHub Profile

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 / 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)
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 / 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>
@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 / code-1.cfm
Created August 8, 2024 20:52 — forked from bennadel/code-1.cfm
How My ColdFusion Code Snippet Color Coding Works
<cffunction
name="ColorCode"
access="public"
returntype="string"
output="false"
hint="This takes code samples and color codes for display.">
<!--- Define arguments. --->
<cfargument name="Code" type="string" required="true" />