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(β¦).| // 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 |
| #!/bin/bash | |
| # | |
| # Written by Chris Arceneaux | |
| # GitHub: https://github.com/carceneaux | |
| # Email: [email protected] | |
| # Website: http://arsano.ninja | |
| # | |
| # Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage | |
| # "artifacts:expire_in" in your .gitlab-ci.yml | |
| # |
| /* Native Error types https://mzl.la/2Veh3TR */ | |
| const nativeExceptions = [ | |
| EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError | |
| ].filter((except) => typeof except === 'function') | |
| /* Throw native errors. ref: https://bit.ly/2VsoCGE */ | |
| function throwNative(error) { | |
| for (const Exception of nativeExceptions) { | |
| if (error instanceof Exception) throw error | |
| } |