$ brew update && brew install kubectl && brew cask install docker minikube virtualbox
$ brew cask reinstall minikube
$ minikube delete
$ rm -fr ~/.minikube/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
session=lxqt | |
geometry=1920x1080 | |
localhost # comment this out to allow connections from anywhere | |
alwaysshared |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "folder", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "folder", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sub_00(haystack: str="", needle:str="") -> bool: | |
return needle in haystack | |
assert sub_00("the quick brown fox jumped over the lazy dog", "lazy") == True | |
assert sub_00("the quick brown fox jumped over the lazy dog", "lazys") == False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-t', '--time', type=int, required=True, help="Time in seconds") | |
parser.add_argument('-o', '--output',default="counter.txt", help="Output file") | |
args = parser.parse_args() | |
def countdown(t): | |
while t: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUN ["apt-get", "update"] | |
RUN ["apt-get", "install", "-y", "zsh"] | |
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true | |
# docker exec -it my-app-container /bin/zsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'SetupPivot: The following subroutine sets up a pivot table | |
' | |
' | |
' author: [email protected] | |
' | |
'I received assitance from the following site: | |
' |
NewerOlder