💥 🚧 wip SIS make-rules
This commit is contained in:
parent
e31cac9e16
commit
256ac74aa8
3 changed files with 41 additions and 4 deletions
|
|
@ -11,6 +11,8 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da
|
||||||
* [o] configure **tmux**:
|
* [o] configure **tmux**:
|
||||||
* [X] remote nested sessions
|
* [X] remote nested sessions
|
||||||
* [X] change tmux:pane-switching bindings from arrow keys to vim bindings
|
* [X] change tmux:pane-switching bindings from arrow keys to vim bindings
|
||||||
|
* [ ] add server-sync make-rule for ip-upload python cronjob
|
||||||
|
* [ ] add server-sync make-rule for server ip fetching (and writing...)
|
||||||
* [ ] nvim / lvim
|
* [ ] nvim / lvim
|
||||||
* [ ] make-rule for setting up `$HOME/.venvs/nvim/bin/python`
|
* [ ] make-rule for setting up `$HOME/.venvs/nvim/bin/python`
|
||||||
* [ ] make-rules for getting nvim checkhealth up to speed
|
* [ ] make-rules for getting nvim checkhealth up to speed
|
||||||
|
|
|
||||||
13
makefile
13
makefile
|
|
@ -47,3 +47,16 @@ setup_editorconfig:
|
||||||
setup_nerdfonts:
|
setup_nerdfonts:
|
||||||
git clone --depth 2 https://github.com/ryanoasis/nerd-fonts/ ~/nerd-fonts
|
git clone --depth 2 https://github.com/ryanoasis/nerd-fonts/ ~/nerd-fonts
|
||||||
cd ~/nerd-fonts && ./install.sh
|
cd ~/nerd-fonts && ./install.sh
|
||||||
|
|
||||||
|
setup_server_ip_sync:
|
||||||
|
echo "Visit github to generate new token:"
|
||||||
|
echo " github.com/settings/tokens/new"
|
||||||
|
@echo "Enter github token: "; \
|
||||||
|
read token; \
|
||||||
|
echo "Your token is ", $$(token)
|
||||||
|
|
||||||
|
setup_server_ip_sync_python_env:
|
||||||
|
mkdir -p ~/.venvs
|
||||||
|
python3 -m venv ~/.venvs/server_ip_sync
|
||||||
|
~/.venvs/server_ip_sync/bin/pip install python-dotenv
|
||||||
|
echo "~/.venvs/server_ip_sync/bin/python server-ip-sync.py" >> ~/deleteme-server-in-sync.txt
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,35 @@
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|
||||||
### Env file
|
### Env file
|
||||||
|
|
||||||
|
Make rules:
|
||||||
|
* [.] add make rules python cronjob for servers
|
||||||
|
* [.] make `.env`: `setup_server_ip_sync_dotenv_file`
|
||||||
|
* [.] make venv and install requirements: `setup_server_ip_sync_python_env`
|
||||||
|
* [ ] add oneliner to cron `<path-to-venv>/python server-ip-sync.py --upload`
|
||||||
|
|
||||||
|
```makefile
|
||||||
|
addcron:
|
||||||
|
CRONENTRY=
|
||||||
|
{ crontab -l; echo "*/2 * * * * /usr/bin/node cronapp.js >> logfile.log" } | crontab -
|
||||||
|
|
||||||
|
add_github_token:
|
||||||
|
echo "Visit github to generate new token:"
|
||||||
|
echo " github.com/settings/tokens/new"
|
||||||
|
@echo "Enter github token: "; \
|
||||||
|
read token; \
|
||||||
|
echo "Your token is ", $$(token)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
* [get token](https://github.com/settings/tokens/new)
|
||||||
|
* refernce [API description](https://docs.github.com/en/rest/gists#update-a-gist)
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# template .env file
|
# template .env file
|
||||||
token='ghp_<your gist token>'
|
token='ghp_<your gist token>' # github token
|
||||||
gist_id='abc...123'
|
gist_id='abc...123' # gist id
|
||||||
filename='<filename-in-gist>.txt'
|
filename='<filename-in-gist>' # nickname for the server (i.e iot-hub-server)
|
||||||
```
|
```
|
||||||
|
|
||||||
### python requirements
|
### python requirements
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue