-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaskfile.dist.yaml
335 lines (282 loc) · 9.9 KB
/
Taskfile.dist.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
version: "3"
tasks:
default:
deps:
- task: task-ls
greet:
cmds:
- echo $GREETING
env:
GREETING: Hey, there!
task-ls:
desc: List available tasks
cmds:
- task --list
clone-global-taskfile:
desc: Clone the global Taskfile.dist.yaml to the current directory
dir: "{{.USER_WORKING_DIR}}"
cmds:
- cp $HOME/Taskfile.dist.yaml Taskfile.dist.yaml
tmux-new:
desc: Create a new tmux session
cmds:
- tmux new -s {{.CLI_ARGS}}
tmux-ls:
desc: List tmux sessions
cmds:
- tmux ls
tmux-attach:
desc: Attach to a tmux session
cmds:
- tmux attach -t {{.CLI_ARGS}}
sysinfo:
desc: Print system information
cmds:
- neofetch
code-tunnel:
desc: Create a tunnel to a remote VS Code instance
cmds:
- code tunnel --accept-server-license-terms
poetry-disable-virtualenvs:
desc: Disable virtualenvs in poetry
cmds:
- poetry config virtualenvs.create false
poetry-enable-virtualenvs:
desc: Enable virtualenvs in poetry
cmds:
- poetry config virtualenvs.create true
python-keyring-disable:
desc: Disable keyring in Python
cmds:
- export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
init-hyperfast-project:
desc: Create a new project using the hyperfast template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- copier copy --UNSAFE gh:entelecheia/hyperfast-template .
init-hyfi-project:
desc: Create a new project using the hyfi template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- copier copy --UNSAFE gh:entelecheia/hyfi-template .
init-hyperfast-python-project:
desc: Create a new Python project using the hyperfast template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- copier copy --UNSAFE gh:entelecheia/hyperfast-python-template .
init-hyperfast-docker-project:
desc: Create a new Docker project using the hyperfast template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- copier copy --UNSAFE gh:entelecheia/hyperfast-docker-template .
reinit-hyperfast-python-project:
desc: Reinitialize a project using the hyperfast python template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- args=(); while IFS= read -r file; do args+=("--skip" "$file"); done < .copierignore; copier copy "${args[@]}" --answers-file .copier-config.yaml --UNSAFE gh:entelecheia/hyperfast-python-template .
reinit-hyperfast-docker-project:
desc: Reinitialize a project using the hyperfast docker template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- args=(); while IFS= read -r file; do args+=("--skip" "$file"); done < .copierignore; copier copy "${args[@]}" --answers-file .copier-config.yaml --UNSAFE gh:entelecheia/hyperfast-docker-template .
reinit-hyperfast-project:
desc: Reinitialize a project using the hyperfast template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- args=(); while IFS= read -r file; do args+=("--skip" "$file"); done < .copierignore; copier copy "${args[@]}" --answers-file .copier-config.yaml --UNSAFE gh:entelecheia/hyperfast-template .
reinit-hyfi-project:
desc: Reinitialize a project using the hyfi template
dir: "{{.USER_WORKING_DIR}}"
cmds:
- args=(); while IFS= read -r file; do args+=("--skip" "$file"); done < .copierignore; copier copy "${args[@]}" --data 'code_template_source=gh:entelecheia/hyfi-template' --answers-file .copier-config.yaml --UNSAFE gh:entelecheia/hyperfast-python-template .
semantic-release-version:
desc: Print the current version using semantic-release
dir: "{{.USER_WORKING_DIR}}"
cmds:
- semantic-release print-version --current
semantic-release-next-version:
desc: Print the next version using semantic-release
dir: "{{.USER_WORKING_DIR}}"
cmds:
- semantic-release print-version --next
semantic-release-changelog:
desc: Print the changelog using semantic-release
dir: "{{.USER_WORKING_DIR}}"
cmds:
- semantic-release changelog --released
semantic-release-next-change:
desc: Print the next change using semantic-release
dir: "{{.USER_WORKING_DIR}}"
cmds:
- semantic-release changelog --unreleased
semantic-release-noop:
desc: Run semantic-release in noop mode (dry run)
dir: "{{.USER_WORKING_DIR}}"
cmds:
- semantic-release --noop -v DEBUG
semantic-prerelease-noop:
desc: Run semantic-release in noop mode (dry run) for a prerelease
dir: "{{.USER_WORKING_DIR}}"
cmds:
- semantic-release --noop --prerelease -v DEBUG
git-show-branches:
desc: Show branches in the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git show-branch --list
git-show-tags:
desc: Show tags in the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git tag --list
git-show-remotes:
desc: Show remotes in the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git remote --verbose
git-show-refs:
desc: Show refs in the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git show-ref
git-checkout-branch:
desc: Checkout a branch in the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git checkout {{.CLI_ARGS}}
git-checkout-main:
desc: Checkout the main branch in the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git checkout main
git-checkout-branch-upstream:
desc: Checkout a branch in the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git checkout -B {{.CLI_ARGS}}
- git push --set-upstream origin {{.CLI_ARGS}}
git-sync-fork-main:
desc: Sync a fork with the main branch of the upstream repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git fetch upstream
- git checkout main
- git merge upstream/main
- git push
# ref: https://adamj.eu/tech/2023/02/13/git-skip-hooks/
git-disable-hook:
desc: Disable a Git hook (Skip “unskippable” hooks, e.g. lfs hooks)
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git config core.hooksPath /dev/null
git-enable-hook:
desc: Enable a Git hook (unset core.hooksPath)
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git config --unset core.hooksPath
git-lfs-skip-smudge:
desc: Set global Git LFS smudge filter to skip (for faster checkout or for CI)
cmds:
- git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
- git config --global filter.lfs.process "git-lfs filter-process --skip"
git-lfs-smudge:
desc: Set global Git LFS smudge filter to default (enable smudging)
cmds:
- git config --global filter.lfs.smudge "git-lfs smudge -- %f"
- git config --global filter.lfs.process "git-lfs filter-process"
git-clone-skip-smudge:
desc: Clone a Git repository with LFS smudge filter set to skip
dir: "{{.USER_WORKING_DIR}}"
cmds:
- GIT_LFS_SKIP_SMUDGE=1 git clone {{.CLI_ARGS}}
git-lfs-install:
desc: Install Git LFS
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git lfs install
git-lfs-track:
desc: Track files with Git LFS
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git lfs track {{.CLI_ARGS}}
git-lfs-track-preset:
desc: Track files with Git LFS using a preset
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git lfs track "*.parquet"
- git lfs track "*.pkl"
- git lfs track "*.pth"
- git lfs track "*.pt"
- git lfs track "*.tar"
- git lfs track "*.tar.gz"
- git lfs track "*.tgz"
- git lfs track "*.zip"
- git lfs track "*.zst"
- git lfs track "*.gz"
- git lfs track "*.ogg"
- git lfs track "*.mp3"
- git lfs track "*.mp4"
- git lfs track "*.wav"
- git lfs track "*.avi"
- git lfs track "*.mov"
- git lfs track "*.mkv"
- git lfs track "*.flac"
- git lfs track "*.xlsx"
- git lfs track "*.xls"
- git lfs track "*.csv"
- git lfs track "*.tsv"
- git lfs track "*.pdf"
- git lfs track "*.docx"
- git lfs track "*.doc"
- git lfs track "*.pptx"
- git lfs track "*.ppt"
- git lfs track "*.hwp"
git-lfs-migrate:
desc: Migrate files to Git LFS
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git lfs migrate import --everything --include={{.CLI_ARGS}}
lfs-folderstore-init:
desc: Initialize the LFS folderstore for the current Git repository
dir: "{{.USER_WORKING_DIR}}"
cmds:
- git config --add lfs.customtransfer.lfs-folder.path "${HOME}/.local/bin/lfs-folderstore"
- git config --add lfs.customtransfer.lfs-folder.args "/home/yj.lee/workspace/onedrive/lfs-folderstore"
- git config --add lfs.standalonetransferagent lfs-folder
- git config lfs.url "https://localhost"
restart-docker-daemon:
desc: Restart the Docker daemon
cmds:
- restart-docker-daemon
watch-nvidia-smi:
desc: Watch nvidia-smi output every second (useful for monitoring GPU usage)
cmds:
- watch -n 1 nvidia-smi
dns-status:
desc: Check the status of the DNS resolver
cmds:
- resolvectl status | grep "DNS Server" -A2
sysinfo-inxi:
desc: Print system information using inxi
cmds:
- inxi -F
install-node-lts:
desc: Install the latest LTS version of Node.js
cmds:
- export NVM_DIR="${HOME}/.nvm"; [ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"; nvm install --lts
nvm-ls:
desc: List installed Node.js versions
cmds:
- export NVM_DIR="${HOME}/.nvm"; [ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"; nvm ls
set-default-node:
desc: Set the default Node.js version
cmds:
- export NVM_DIR="${HOME}/.nvm"; [ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"; nvm alias default node
install-github-copilot-cli:
desc: Install the GitHub Copilot CLI
cmds:
- npm install -g @githubnext/github-copilot-cli
add-github-copilot-cli-aliases:
desc: Add aliases for the GitHub Copilot CLI
cmds:
- eval "$(github-copilot-cli alias -- "$0")"