Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
This gist
is designed to explain how to configure a project where you have your test code separated from your codebase. The project file structure looks a bit like this:
project
├─┬ lib # could be src
│ ├── globals.d.ts # source code specific type declarations
│ └── index.ts
├─┬ tests
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]} |
FROM hayd/alpine-deno:1.10.1 | |
WORKDIR /src/app | |
ADD deps.ts ./ | |
RUN ["deno", "cache", "deps.ts"] | |
ADD *.ts ./ | |
RUN ["deno", "cache", "mod.ts"] | |
ENTRYPOINT ["deno", "run", "--unstable", "--allow-net", "--allow-hrtime", "--allow-env", "--cached-only", "--no-check", "mod.ts"] |
FROM elixir:1.11.2 AS build | |
## instll some dependencies (webpack basically) | |
RUN \ | |
apt-get update -y && \ | |
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ | |
apt-get install -y nodejs && node -v && npm -v | |
# Required environment variables passed in via --build-arg flags |
#!/bin/sh | |
set -o nounset | |
set -o errexit | |
usage(){ | |
echo "Usage: $0 X.Y.Z dev|test|staging|prod" | |
echo "" | |
echo "example: ./deploy.sh 1.1.3 prod" | |
echo "example: ./deploy.sh 1.2.0 dev" |
name: Elixir CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
MIX_ENV: test |