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
[core] | |
editor = code --wait | |
[alias] | |
s = !git status -s | |
c = !git add . && git commit -m | |
amend = !git add . && git commit --amend --no-edit | |
l = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
sw = !git switch |
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
// env https://www.youtube.com/watch?v=cQewqCSez5I | |
SERVER_TYPE=http | |
SERVER_PORT=8080 | |
SERVER_URL=http://localhost:8080 | |
SENTRY_DSN= | |
CORS_ORIGIN=* | |
CORS_METHODS=GET,POST,PUT,DELETE | |
CORS_CREDENTIALS=true |
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
package main | |
import ( | |
"fmt" | |
"net/url" | |
"os" | |
"os/exec" | |
"strings" | |
"github.com/spf13/cobra" |
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
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage: source git_config.sh <username>" | |
return 1 | |
fi | |
case $1 in | |
"personal") | |
git config --local user.email PERSONAL@EMAIL.COM |
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 timed_lru_cache(seconds: int = 60, maxsize: int = 1): | |
def wrapper_cache(func): | |
func = lru_cache(maxsize=maxsize)(func) | |
func.lifetime = timedelta(seconds=seconds) | |
func.expiration = datetime.utcnow() + func.lifetime | |
@wraps(func) | |
def wrapped_func(*args, **kwargs): | |
if datetime.utcnow() >= func.expiration: | |
func.cache_clear() |
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
from rich.console import Console | |
from rich.table import Table | |
table = Table(title='Semantic GIT') | |
table.add_column('Command', justify='right', style='cyan', no_wrap=True) | |
table.add_column('Description', style='magenta') | |
table.add_row( | |
'👷 build', |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from tempfile import NamedTemporaryFile | |
from typing import Dict | |
import requests | |
from fastapi import FastAPI | |
from fastapi.responses import FileResponse | |
from pydantic import BaseModel | |
class ToDownload(BaseModel): | |
file: Dict[str, str] |
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 asyncio | |
import json | |
from playwright.async_api import async_playwright | |
class NetWork: | |
def __init__(self, url, **kwargs): | |
self.network = asyncio.get_event_loop().run_until_complete( | |
self.watch_network(url, **kwargs) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder