Skip to content

Instantly share code, notes, and snippets.

View rapPayne's full-sized avatar
:octocat:
Working from home

Rap Payne rapPayne

:octocat:
Working from home
View GitHub Profile
@rapPayne
rapPayne / inherit_me.dart
Created November 22, 2023 23:24 — forked from slightfoot/inherit_me.dart
Inherited Widget Example - by Simon Lightfoot - Humpday Q&A :: 22nd November 2023 #Flutter #Dart
// MIT License
//
// Copyright (c) 2023 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@rapPayne
rapPayne / main.dart
Created December 23, 2023 00:54
obsidian-echo-0681
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@rapPayne
rapPayne / main.dart
Created March 10, 2024 21:37
Flutter responsive scrolling
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Please build a RESTful node/express server app that ....
- supports authentication with username and password (no need for OAuth)
- Reads/writes from a flat file JSON-formatted database called ‘./database.json’
- The database has these collections: products, users, orders
- Products have id, name, price, category, on_hand, description
- Users have username, street_address, email, password, first, last, and role
- Orders have id, username,order_date, ship_address, and an array of {product_id, quantity, price}
- Has a search for products capability by name or category
- Has a checkout endpoint so the user can check out. It pretends to charge the user’s credit card and adds the placed order to the orders collection.
- The products GET endpoint is open to all