Important Resources:
The tsx documentation includes the following points about what makes it a better option than ts-node:
| # delete/uninstall gitlab runner from ubuntu 22.04 | |
| # Stop and remove the service | |
| sudo gitlab-runner stop | |
| sudo gitlab-runner uninstall | |
| sudo systemctl daemon-reload | |
| # Remove gitlab-runner files and config | |
| sudo rm -rf /usr/local/bin/gitlab-runner | |
| sudo userdel gitlab-runner | |
| sudo rm -rf /home/gitlab-runner/ |
Important Resources:
The tsx documentation includes the following points about what makes it a better option than ts-node:
| #!/bin/bash | |
| GITLAB_URL="https://example.gitlab.com/" | |
| PROJECT_ID="2" # get this id via the repo/project's overview page | |
| ACCESS_TOKEN="glpat-abc" | |
| # Create a new merge request | |
| curl --header "Private-Token: $ACCESS_TOKEN" \ | |
| "$GITLAB_URL/api/v4/projects/$PROJECT_ID/merge_requests" \ | |
| --data "source_branch=my-branch" \ | |
| --data "target_branch=main" \ |
sudo nano /etc/mongod.conf
#security:
# authroization: "enabled"
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
| Description | Syntax |
|---|---|
| Get the length of a string | ${#VARNAME} |
| Get a single character | ${VARNAME[index]} |
| // app.js: register the route. In our case, we don't want authorization for this route | |
| app.use('/healthcheck', require('./routes/healthcheck.routes')); | |
| // healthcheck.routes.js: return a 2xx response when your server is healthy, else send a 5xx response | |
| import express from 'express'; | |
| const router = express.Router({}); | |
| router.get('/', async (_req, res, _next) => { | |
| // optional: add further things to check (e.g. connecting to dababase) |
| # This is a slightly modified version of Mojave (10.14) script located in /etc/bashrc_Apple_Terminal | |
| # modified to work with zsh. | |
| # It mainly calls update_terminal_cwd when changing the working directory, which prints a special | |
| # invisible string that Apple Terminal interprets and updates the current term title accordingly. | |
| # Note : this script is useless for macOS Catalina and newer versions of macOS, since it should | |
| # already contain at least this functionality. | |
| # Instructions | |
| # Place this file in /etc/ (alongside bash_Apple_Terminal) |
| # PROMPT | |
| # default macOS prompt is: \h:\W \u\$ | |
| # assemble the prompt string PS1 | |
| # inspired from: https://stackoverflow.com/a/16715681 | |
| function __build_prompt { | |
| local EXIT="$?" # store current exit code | |
| # define some colors |