Skip to content

Instantly share code, notes, and snippets.

View itbj's full-sized avatar
🌴
On vacation

taoza itbj

🌴
On vacation
View GitHub Profile
@Marmiz
Marmiz / main.rs
Last active March 4, 2024 19:12
Final section of todo-cli
use std::collections::HashMap;
fn main() {
let action = std::env::args().nth(1).expect("Please provide an action");
let item = std::env::args().nth(2).expect("Please provide an item");
let mut todo = Todo::new().expect("Initialisation of db failed");
if action == "add" {
todo.insert(item);
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@miguelmota
miguelmota / config
Last active April 5, 2025 01:01
Arch linux VNC server setup
session=lxqt
geometry=1920x1080
localhost # comment this out to allow connections from anywhere
alwaysshared
#main.py
from fastapi import FastAPI,Body, Depends
import schemas
import models
from database import Base, engine, SessionLocal
from sqlalchemy.orm import Session
#This will create our database if it doesent already exists
Base.metadata.create_all(engine)
def get_session():
session = SessionLocal()