mirror of
https://github.com/agresdominik/cheat_sheet.git
synced 2026-04-21 18:05:51 +00:00
Fixed b to quit, added commands
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
"command": "df -h /path/to/mount",
|
||||
"desc": "Show statistics about a drive (remove path for all)"
|
||||
},
|
||||
{
|
||||
"command": "free -h",
|
||||
"desc": "Display memory usage in human-readable units"
|
||||
},
|
||||
{
|
||||
"command": "find /path/to/directory -type f | wc -l",
|
||||
"desc": "Show amount of files in directory and its sub-directories"
|
||||
@@ -23,6 +27,10 @@
|
||||
{
|
||||
"command": "echo Hostname: $(hostname); echo Local_IP: $(hostname -I | awk '{print $1}'); echo Default_Gateway: $(ip route | awk '/default/ {print $3}')",
|
||||
"desc": "Print IP Address, Hostname, Default Route"
|
||||
},
|
||||
{
|
||||
"command": "tar -czf backup.tgz /path/to/dir",
|
||||
"desc": "Create a quick compressed backup of a directory"
|
||||
}
|
||||
],
|
||||
"python": [
|
||||
@@ -30,6 +38,18 @@
|
||||
"command": "python3 -m venv .venv && source .venv/bin/activate",
|
||||
"desc": "Initialise a (simple) .venv and activate it"
|
||||
},
|
||||
{
|
||||
"command": "python -m http.server 8000",
|
||||
"desc": "Serve the current directory over HTTP on port 8000"
|
||||
},
|
||||
{
|
||||
"command": "python -m pip install --upgrade pip",
|
||||
"desc": "Upgrade pip to the latest version"
|
||||
},
|
||||
{
|
||||
"command": "python -m pip freeze > requirements.txt",
|
||||
"desc": "Export current Python dependencies to requirements.txt"
|
||||
},
|
||||
{
|
||||
"command": "pip install jupyterlab ipykernel && python3 -m ipykernel install --user --name=project-name",
|
||||
"desc": "Install and initialise the kernel to use in jupyter"
|
||||
@@ -44,6 +64,18 @@
|
||||
"command": "go mod init github.com/username/projectname",
|
||||
"desc": "Initialise a go project and create a mod file"
|
||||
},
|
||||
{
|
||||
"command": "go test ./...",
|
||||
"desc": "Run all Go tests recursively"
|
||||
},
|
||||
{
|
||||
"command": "go test -bench=. ./...",
|
||||
"desc": "Run all benchmarks in the module"
|
||||
},
|
||||
{
|
||||
"command": "go list -m all",
|
||||
"desc": "List all resolved module dependencies"
|
||||
},
|
||||
{
|
||||
"command": "go get github.com/some/package@latest",
|
||||
"desc": "Add dependencies"
|
||||
|
||||
Reference in New Issue
Block a user