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
@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" />
@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

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 / fetch-api-examples.md
Created October 4, 2021 22:22 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@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.

@nastanford
nastanford / 0-react-hello-world.md
Created January 30, 2018 16:26 — forked from danawoodman/0-react-hello-world.md
React Hello World Examples

React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).

Usage

You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.

@nastanford
nastanford / animate.tsx
Created September 30, 2017 13:40 — forked from rossimo/animate.tsx
Design for React Games
import * as Rx from 'rxjs/Rx';
import * as tween from 'tween-functions'
import * as update from 'immutability-helper'
import { call, take, Func1, CallEffectFn } from 'redux-saga/effects'
import { eventChannel, END } from 'redux-saga'
import * as _ from 'lodash'
export let tick = new Rx.Subject();
export let draw = new Rx.Subject<State>();