docker exec -it <container_name> mongosh -u <user_name> -p <password>
With -u
an -p
options being optional(obv).
defmodule TaskRunnerGenServer do | |
use GenServer | |
@impl true | |
def init(%{remote_node: remote_node} = args) do | |
# GenServer.start_link(TaskRunnerGenServer, %{remote_node: "REMOTE_NOTE_AT0M"}, name: TaskRunnerGenServer) | |
{:ok, %{ref: nil, node: remote_node}} | |
end | |
def start_task do |
# Warning: I used ChatGPT to write this bash script | |
#!/bin/bash | |
# Check if an argument is provided | |
if [ -z "$1" ]; then | |
echo "Please provide an integer argument." | |
exit 1 | |
fi |
const {diff} = require('@asyncapi/diff'); | |
const {Parser, fromFile} = require("@asyncapi/parser"); | |
const parser = new Parser(); | |
async function main() { | |
const firstDocumentFile = fromFile(parser, './test/fixtures/asyncapi_v1.yml'); | |
const SecondDocumentFile = fromFile(parser, './test/fixtures/asyncapi_v2.yml'); | |
const firstDocument = await firstDocumentFile.parse(); |
# Projman - A project manager written in elixir. | |
# Run using elixir projman.exs | |
# With projman, you can open your projects easily through the command line. | |
# 1. Save a project using its path, and the preferred editor you want to open the project in. | |
# 2. Select the project you want to open, and this application will take care of opening the project for you. | |
Mix.install([:jason]) | |
defmodule Projman do | |
def add_project(project_path, project_name, editor_command) do |
def strip_ansi(text) do | |
# Taken from: https://github.com/chalk/strip-ansi/blob/main/index.js | |
# Original regex from https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js#L2 contained \u | |
# But PCRE doesn't support \u, it uses \x instead | |
# See: https://stackoverflow.com/questions/3538293/regular-expression-pcre-does-not-support-l-l-n-p | |
ansi_regex = | |
~r/[\x{001B}\x{009B}][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\x{0007})|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/ | |
String.replace(text, ansi_regex, "") | |
end |
defmodule TodoList do | |
defstruct auto_id: 1, entries: %{} | |
use GenServer | |
def start do | |
GenServer.start(TodoList, nil) | |
end | |
def add_entry(pid, entry) do | |
GenServer.cast(pid, {:put, entry}) |
enum AuthRequestType { | |
LOGIN, | |
LOGOUT, | |
} | |
function authRequest( | |
url: string, | |
username: string, | |
password: string, | |
authRequest: AuthRequestType |
Organization - Postman
Sub-Organization - AsyncAPI
Project - AsyncAPI Diff
Mentor - Vinit Shahdeo, Anubhav Vats