mirror of
https://github.com/xcad2k/cheat-sheets.git
synced 2022-05-05 20:20:37 +03:00
updates
This commit is contained in:
@@ -30,4 +30,4 @@ GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
|
||||
3. Update permissions
|
||||
```mysql
|
||||
FLUSH PRIVILEGES;
|
||||
```
|
||||
```
|
||||
|
||||
1
infrastructure/kasm.md
Normal file
1
infrastructure/kasm.md
Normal file
@@ -0,0 +1 @@
|
||||
# KASM Cheat-Sheet
|
||||
11
linux/mount.md
Normal file
11
linux/mount.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Mount Cheat-Sheet
|
||||
List mount-points
|
||||
```
|
||||
findmnt (optional)<device/directory>
|
||||
```
|
||||
|
||||
Unmount
|
||||
```
|
||||
umount <device/directory>
|
||||
```
|
||||
|
||||
11
linux/nfs.md
11
linux/nfs.md
@@ -1,6 +1,15 @@
|
||||
# NFS Cheat-Sheet
|
||||
## Install NFS
|
||||
Install NFS Client on Ubuntu
|
||||
```
|
||||
sudo apt -y update
|
||||
sudo apt -y install nfs-common
|
||||
```
|
||||
|
||||
## Permissions
|
||||
## Client Configuration
|
||||
|
||||
|
||||
## Server Configuration
|
||||
### Configuration
|
||||
*TEMP EXAMPLE*:
|
||||
`/srv/nfs 192.168.1.2(rw,sync,no_root_squash,subtree_check)`
|
||||
|
||||
@@ -6,10 +6,14 @@ Datree can be used on the command line to run policies against Kubernetes manife
|
||||
**Windows** (PowerShell)
|
||||
```powershell
|
||||
iwr -useb https://get.datree.io/windows_install.ps1 | iex
|
||||
|
||||
setx PATH "$env:path;C:\Users\$env:UserName\AppData\Local\datree" -m
|
||||
```
|
||||
|
||||
**Linux** (Bash)
|
||||
```bash
|
||||
sudo apt -y install unzip
|
||||
|
||||
curl https://get.datree.io | /bin/bash
|
||||
```
|
||||
|
||||
|
||||
13
tools/starship.md
Normal file
13
tools/starship.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Starship Prompt
|
||||
## Installation
|
||||
### Linux
|
||||
1. Install the latest version for your system:
|
||||
```
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
2. Add the following to the end of `~/.bashrc` or `~/.zshrc`:
|
||||
```
|
||||
eval "$(starship init bash)"
|
||||
# -- or --
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
@@ -1,16 +1,18 @@
|
||||
# WSL Cheat-Sheet
|
||||
## Symbolic Links
|
||||
### Link .ssh folder
|
||||
```
|
||||
```bash
|
||||
sudo ln -s /mnt/c/Users/lempa/.ssh ~/.ssh
|
||||
```
|
||||
|
||||
### Link .kube folder
|
||||
```
|
||||
```bash
|
||||
sudo ln -s /mnt/c/Users/lempa/.ssh ~/.ssh
|
||||
```
|
||||
|
||||
## File Permissions
|
||||
Advanced settings configuration in WSL: [WSL Config Parameters](https://docs.microsoft.com/en-us/windows/wsl/wsl-config)
|
||||
|
||||
**Example wsl.conf**
|
||||
```
|
||||
[automount]
|
||||
|
||||
0
windows/powershell.md
Normal file
0
windows/powershell.md
Normal file
54
windows/variables.md
Normal file
54
windows/variables.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Variables in Windows
|
||||
## How to use in PowerShell
|
||||
Environment Varaibles can be used in PowerShell ([[powershell]]) with the prefix `$env:`.
|
||||
|
||||
**Example***:
|
||||
*Variable:* `%APPDATA%`
|
||||
*In Powershell:* `$env:APPDATA`
|
||||
|
||||
## List of environment variables
|
||||
Variable | Description
|
||||
---|---
|
||||
`%ALLUSERSPROFILE%`|C:\ProgramData
|
||||
`%APPDATA%`|C:\Users\{username}\AppData\Roaming
|
||||
`%COMMONPROGRAMFILES%`|C:\Program Files\Common Files
|
||||
`%COMMONPROGRAMFILES(x86)%`|C:\Program Files (x86)\Common Files
|
||||
`%CommonProgramW6432%`|C:\Program Files\Common Files
|
||||
`%COMSPEC%`|C:\Windows\System32\cmd.exe
|
||||
`%HOMEDRIVE%`|C:\
|
||||
`%HOMEPATH%`|C:\Users\{username}
|
||||
`%LOCALAPPDATA%`|C:\Users\{username}\AppData\Local
|
||||
`%LOGONSERVER%`|\\{domain_logon_server}
|
||||
`%PATH%`|C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
|
||||
`%PathExt%`|.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc
|
||||
`%PROGRAMDATA%`|C:\ProgramData
|
||||
`%PROGRAMFILES%`|C:\Program Files
|
||||
`%ProgramW6432%`|C:\Program Files
|
||||
`%PROGRAMFILES(X86)%`|C:\Program Files (x86)
|
||||
`%PROMPT%`|$P$G
|
||||
`%SystemDrive%`|C:
|
||||
`%SystemRoot%`|C:\Windows
|
||||
`%TEMP%`|C:\Users\{username}\AppData\Local\Temp
|
||||
`%TMP%`|C:\Users\{username}\AppData\Local\Temp
|
||||
`%USERDOMAIN%`|Userdomain associated with current user.
|
||||
`%USERDOMAIN_ROAMINGPROFILE%`|Userdomain associated with roaming profile.
|
||||
`%USERNAME%`|{username}
|
||||
`%USERPROFILE%`|C:\Users\{username}
|
||||
`%WINDIR%`|C:\Windows
|
||||
`%PUBLIC%`|C:\Users\Public
|
||||
`%PSModulePath%`|%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\
|
||||
`%OneDrive%`|C:\Users\{username}\OneDrive
|
||||
`%DriverData%`|C:\Windows\System32\Drivers\DriverData
|
||||
`%CD%`|Outputs current directory path. (Command Prompt.)
|
||||
`%CMDCMDLINE%`|Outputs command line used to launch current Command Prompt session. (Command Prompt.)
|
||||
`%CMDEXTVERSION%`|Outputs the number of current command processor extensions. (Command Prompt.)
|
||||
`%COMPUTERNAME%`|Outputs the system name.
|
||||
`%DATE%`|Outputs current date. (Command Prompt.)
|
||||
`%TIME%`|Outputs time. (Command Prompt.)
|
||||
`%ERRORLEVEL%`|Outputs the number of defining exit status of previous command. (Command Prompt.)
|
||||
`%PROCESSOR_IDENTIFIER%`|Outputs processor identifier.
|
||||
`%PROCESSOR_LEVEL%`|Outputs processor level.
|
||||
`%PROCESSOR_REVISION%`|Outputs processor revision.
|
||||
`%NUMBER_OF_PROCESSORS%`|Outputs the number of physical and virtual cores.
|
||||
`%RANDOM%`|Outputs random number from 0 through 32767.
|
||||
`%OS%`|Windows_NT
|
||||
Reference in New Issue
Block a user