Skip to content

Instantly share code, notes, and snippets.

View prof3ssorSt3v3's full-sized avatar
🎯
Focusing

Steve Griffith prof3ssorSt3v3

🎯
Focusing
View GitHub Profile
@prof3ssorSt3v3
prof3ssorSt3v3 / main.dart
Created March 20, 2025 15:23
Example of Nested Navigation in Flutter with named routes
import 'package:flutter/material.dart';
/// Flutter code sample for [Navigator].
void main() => runApp(const NavigatorExampleApp());
class NavigatorExampleApp extends StatelessWidget {
const NavigatorExampleApp({super.key});
@override
@prof3ssorSt3v3
prof3ssorSt3v3 / homepage.dart
Last active March 20, 2025 19:10
Starter Flutter Page
// lib/pages/homepage.dart
import 'package:flutter/material.dart';
class HomePage extends StatelessWidget {
HomePage({super.key});
final TextStyle big = TextStyle(fontSize: 30);
@override
Widget build(BuildContext context) {
@prof3ssorSt3v3
prof3ssorSt3v3 / main.dart
Last active March 13, 2025 00:10
Six Flutter Layout Practice Exercise
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// function Component(){
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script>
class Blah extends HTMLElement {
constructor() {
super();
@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Last active December 6, 2024 16:58
Promises discussion file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Promises</title>
<script>
document.addEventListener('DOMContentLoaded', init);
function init() {
@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Last active December 6, 2024 16:59
Pagination Discussion File
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pagination</title>
<style>
* {
box-sizing: border-box;
font-weight: 300;
@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Created December 5, 2024 16:07
Event discussion file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Events</title>
<style>
body {
font-family: sans-serif;
padding: 0;
@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Created December 5, 2024 16:06
Content-Security-Policy Discussion File
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSP</title>
<meta http-equiv="content-security-policy" content="default-src 'self'; " />
<link rel="shortcut icon" href="" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
@prof3ssorSt3v3
prof3ssorSt3v3 / main.js
Last active January 12, 2025 04:27
Prototype discussion
const log = console.log;
function List(_values) {
//create a List object
if (!Array.isArray(_values)) return;
//exit the function if not given an array
this.items = [..._values]; //copy the array values into a property called items
this.size = this.items.length;
this.first = this.items.length > 0 ? this.items[0] : undefined;
this.last = this.items.length > 1 ? this.items[this.items.length - 1] : undefined;
@prof3ssorSt3v3
prof3ssorSt3v3 / data.js
Created October 2, 2024 16:56
Data file about the Scooby Doo main characters
const characters = [
{
name: 'Scooby-Doo',
role: 'Dog',
personality: 'Cowardly but brave when it matters',
uuid: '550e8400-e29b-41d4-a716-446655440000',
},
{
name: 'Shaggy Rogers',
role: 'Best Friend of Scooby-Doo',