move shell scripts and zsh and add fav vscode themes

This commit is contained in:
writer 2024-10-16 14:34:03 +09:00
parent 40077637ce
commit e6794a8954
43 changed files with 55 additions and 34 deletions

View file

@ -2,22 +2,25 @@
<br>
* **[shell scripts](shell_scripts)**
### dirs in this repo
<br>
* **[awk](awk)**
* **[chef](chef)**
* **[git](git)**
* **[pgp](gpg)**
* **[tmux](tmux)**
* **[iterm](iterm)**
* **[network](network)**
* **[gcloud](gcloud)**
* **[vim](vim)**
* **[vscode](vscode)**
* **[vpn](vpn)**
* **[elastic search](elasticsearch)**
* **[data science](data_science)**
* **[ubuntu](ubuntu)**
* **[elastic search](elasticsearch)**
* **[funny](funny)**
* **[gcloud](gcloud)**
* **[git](git)**
* **[gpg](gpg)**
* **[iterm](iterm)**
* **[shell](shell)**
* **[tmux](tmux)**
* **[vim](vim)**
* **[vpn](vpn)**
* **[vscode](vscode)**
<br>

View file

@ -1,20 +1,25 @@
Data Manipulation
-----------------
## awk
<br>
Print elements in the column 3 that has the word "good" in the other columns
### data manipulation
<br>
* print elements in the column 3 that has the word "good" in the other columns
```
$ awk '/good/ { print $3 }' inventory
```
Syntax:
* syntax:
```
$ awk -f {PROGRAM FILE} FILENAME
```
awk program is:
* awk program is:
```
PATTERN{
@ -24,6 +29,9 @@ PATTERN{
}
```
with
```
. (Dot) Match any character
* Match zero or more character
^ Match beginning of line
@ -34,11 +42,15 @@ $ Match end of line
+ Match one more preceding
? Match zero or one preceding
| Separate choices to match
```
<br>
---
IF condition
------------
### if condition
<br>
```
if (condition)

View file

@ -1,4 +1,6 @@
# Elastalert hacks
## elastalert hacks
<br>
```
curl -s logs.HOST.com:9200/logstash-2017.09.08/_search\?q=ty_params.ProcessName:osqueryd\&size=10000\&sort=@timestamp:desc | jq -r '.hits.hits[]._source.ty_params.Username' | sort | uniq -c | sort -nr

View file

@ -1,9 +1,11 @@
# Some Quick and Useful Shell Commands
## some quick and useful shell commands
<br>
## Downloading all pdfs of url
* downloading all pdfs of url
<br>
```shell
$ wget --recursive --level=2 --no-directories --no-host-directories --accept pdf
@ -11,7 +13,8 @@ $ wget --recursive --level=2 --no-directories --no-host-directories --accept pdf
<br>
## Extended attributes of files
* extended attributes of files
```shell
$ xattr -l $file
@ -19,7 +22,7 @@ $ xattr -l $file
<br>
## Check signatures of Apps
* check signatures of apps
<br>
@ -29,7 +32,7 @@ $ codesign -dvvv $file.app
<br>
## Show all the configs
* show all the configs
<br>
@ -39,7 +42,7 @@ $ system_profiler -detaillevel full
<br>
## 瑪麗
* 瑪麗
<br>

View file

@ -1,8 +1,8 @@
## Basic Tmux Usage
## basic tmux usage
<br>
* Starting a new (named session):
* starting a new (named session):
```
tmux new -s my_session
@ -11,12 +11,12 @@ tmux new -s my_session
<br>
* Detach the session with `Ctrl-b + d`.
* detach the session with `Ctrl-b + d`.
<br>
* List sessions with:
* list sessions with:
```
tmux ls
@ -25,7 +25,7 @@ tmux ls
<br>
* Re-attach a session:
* re-attach a session:
```
tmux attach-session -t my_session
@ -34,7 +34,7 @@ tmux attach-session -t my_session
<br>
* Reload a tmux config file:
* reload a tmux config file:
```
tmux source-file ~/.tmux.conf
@ -43,7 +43,7 @@ tmux source-file ~/.tmux.conf
<br>
* Kill tmux
* kill tmux
```
tmux kill-server

View file

@ -1 +1,2 @@
# Cloud Scripts
## cloud and vpn scripts