Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / state_capitals.json
Created April 27, 2019 12:24
JSON array of states and capitals
[
{
"abbr": "AL",
"name": "Alabama",
"capital": "Montgomery",
"lat": "32.361538",
"long": "-86.279118"
},
{
"abbr": "AK",
@ElBell
ElBell / 5dot0-useful-stuff.md
Created April 26, 2019 05:19
Collected links of channel

5dot0-useful-stuff

GitHub

Learn Git Branching
By: Sunhyun Miller Posted: Feb 08 2019 04:32:18PM
Markdown Cheatsheet · adam-p/markdown-here Wiki · GitHub
By: Sunhyun Miller Posted: Feb 13 2019 12:26:38PM
Summary of 'Clean code' by Robert C. Martin · GitHub
By: Sunhyun Miller Posted: Feb 22 2019 09:20:11AM
GitHub Standard Fork & Pull Request Workflow · GitHub
By: Sunhyun Miller Posted: Feb 22 2019 01:25:44PM

Java

Using Regular Expressions in Java
By: Sunhyun Miller Posted: Mar 18 2019 03:36:13PM
Java Interview Puzzles with Answers - HowToDoInJava
By: Leah Thomas Posted: Apr 22 2019 10:42:16AM

@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active January 31, 2026 19:44
MySQL Cheat Sheet

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

@bradtraversy
bradtraversy / vsc_js_snippets.json
Last active September 3, 2025 00:32
VSCode JavaScript Snippets
{
"Console Log": {
"prefix": "cl",
"body": "console.log($1);",
"description": "Console Log"
},
"Named Function": {
"prefix": "nfn",
"body": ["function ${1:functionName}($2) {", " $3", "}"],
"description": "Named Function"
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active January 28, 2026 14:41
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@bradtraversy
bradtraversy / docker_wordpress.md
Last active January 20, 2026 10:08
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
<?php
class MyTheme
{
private function actionAfterSetup($function)
{
add_action('after_setup_theme', function() use ($function) {
$function();
});
}
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active November 19, 2025 14:28
Online Resources For Web Developers (No Downloading)
@bradtraversy
bradtraversy / pdocrash.php
Last active November 11, 2025 12:29
PDO & Prepared Statements Snippets
<?php
$host = 'localhost';
$user = 'root';
$password = '123456';
$dbname = 'pdoposts';
// Set DSN
$dsn = 'mysql:host='. $host .';dbname='. $dbname;
// Create a PDO instance
@MWins
MWins / project-ideas01.md
Last active January 31, 2026 22:27
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.