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
name: kafka_cluster | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:7.5.3 | |
container_name: zookeeper | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 | |
ports: |
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
name: Deploy SPA | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
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
name: Build SPA | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened, closed] | |
branches: | |
- main | |
jobs: | |
build: |
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
function formatMemoryUsage(data: number) { | |
return `${Math.round((data / 1024 / 1024) * 100) / 100} MB`; | |
} | |
function getCurrentMemoryUsage(): Object { | |
const memoryData = process.memoryUsage(); | |
return { | |
rss: `${formatMemoryUsage(memoryData.rss)} -> Resident Set Size - total memory allocated for the process execution`, | |
heapTotal: `${formatMemoryUsage(memoryData.heapTotal)} -> total size of the allocated heap`, |
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
import { | |
CognitoJwtVerifier, | |
CognitoJwtVerifierSingleUserPool, | |
} from 'aws-jwt-verify/cognito-verifier'; | |
const verifier: CognitoJwtVerifierSingleUserPool<{ | |
userPoolId: string; | |
tokenUse: 'access' | 'id'; | |
clientId: string; | |
}> = CognitoJwtVerifier.create({ |
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
# Install build dependencies for ruby(https://github.com/rbenv/ruby-build/wiki#suggested-build-environment) | |
sudo apt-get install -y autoconf bison patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev | |
# Install rbenv using git | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc | |
source ~/.bashrc | |
# Install ruby-build plugin for rbenv | |
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build | |
# List available ruby versions | |
rbenv install --list |
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
package main | |
import "fmt" | |
func main() { | |
i, j := 42, 2701 | |
fmt.Println(i, j) | |
fmt.Println(&i, &j) | |
// you can read "&i" as "address of i" |
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
#!/bin/bash | |
curl -s https://api.github.com/repos/sharkdp/bat/releases/latest \ | |
| grep -v ".sha256" \ | |
| grep browser_download_url | |
curl -SL https://github.com/sharkdp/bat/releases/download/v0.22.1/bat_0.22.1_amd64.deb -o bat.deb | |
sudo dpkg -i bat.deb | |
rm bat.deb |
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
#!/bin/bash | |
# Install dependencies for pyenv(because pyenv compiles python from the source) | |
## Debian / Ubuntu | |
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl | |
## Fedora | |
# sudo yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel |
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
name: rabbitmq | |
services: | |
rabbitmq: | |
image: rabbitmq:3-management | |
container_name: rabbitondocker | |
ports: | |
- 5672:5672 | |
- 15672:15672 | |
environment: |