This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pomodoro timer (pomo <minutes> <message>) | |
| function pomo() { | |
| arg1=$1 | |
| shift | |
| args="$*" | |
| min=${arg1:?Example: pomo 15 Take a break} | |
| sec=$((min * 60)) | |
| msg="${args:?Example: pomo 15 Take a break}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // $ node lint-openapi-with-vale.js https://link-to-my/swagger.json | |
| const axios = require('axios'); | |
| const { exec } = require('child_process'); | |
| async function fetchSwaggerJson(remoteUrl) { | |
| try { | |
| const response = await axios.get(remoteUrl); | |
| return response.data; | |
| } catch (error) { |