Skip to content

Instantly share code, notes, and snippets.

View muindetuva's full-sized avatar
🎯
Focusing

Alfred Tuva muindetuva

🎯
Focusing
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex</title>
</head>
<body>
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:vazeey/FloatingTab.dart';
import 'loginpage.dart';
class SignupPage extends StatefulWidget {
const SignupPage({Key? key}) : super(key: key);
@override
_SignupPageState createState() => _SignupPageState();
@muindetuva
muindetuva / main.py
Created September 19, 2023 18:32
Student Correcitons Tool
import cmd
# Define a Student class
class Student:
def __init__(self, name, email):
self.name = name
self.email = email
self.corrections = []
def add_correction(self, correction):
@muindetuva
muindetuva / adapter_main.py
Created October 27, 2023 17:21
Python ORMs
import cmd
import MySQLdb
# Define a Student class
class Student:
def __init__(self, name, email):
self.name = name
self.email = email
self.corrections = []
import cmd
import MySQLdb
# Define a Student class
class Student:
def __init__(self, name, email):
self.name = name
self.email = email
self.corrections = []
@muindetuva
muindetuva / todoApp.js
Created December 13, 2023 17:30
TodoApp
// Simple Todo Application
const readlineSync = require('readline-sync');
const { listTodos, markTodoCompleted, addTodo } = require('./todoFunctions')
function displayMenu() {
console.log('\n\nTodo Application Menu: 1. Add | 2. Mark Completed | 3. List | 4. Exit');
}
function runTodoApp(){
@muindetuva
muindetuva / main.py
Created February 20, 2024 16:18
Student Corrections Tracker
import cmd
# Define a Student class
class Student:
def __init__(self, name, email):
self.name = name
self.email = email
self.corrections = []
def add_correction(self, correction):
@muindetuva
muindetuva / profile.json
Created September 25, 2024 13:22
Example Profile that we get from Linkedin.
{
"profile_url": "https://www.linkedin.com/in/tshepiso-mehlape-7a0553146",
"profile": {
"public_identifier": "tshepiso-mehlape-7a0553146",
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/tshepiso-mehlape-7a0553146/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20240925%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20240925T114526Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b293b4b5c70257b1dc17a201557c4fd4160ac690c337e22ef5dfed0038ca8807",
"background_cover_image_url": null,
"first_name": "Tshepiso",
"last_name": "Mehlape",
"full_name": "Tshepiso Mehlape",
"follower_count": 265,
// components/MyUploadForm.tsx
'use client';
import React, { useState, useRef, useCallback } from 'react';
import { db, storage } from '../firebase/config'; // Adjust path if needed
import { collection, addDoc, serverTimestamp } from 'firebase/firestore';
import { ref, uploadBytes, getDownloadURL } from 'firebase/storage'; // Import uploadBytes
const MyUploadForm: React.FC = () => {
const [title, setTitle] = useState<string>('');