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
gh secret set --repo Selleo/mentingo --env demo1-production -f .github.env.sample | |
aws ssm put-parameter --type "SecureString" --region "eu-central-1" --name "/learn/production/api/editable/SENTRY_DSN" --value "null" | |
az keyvault secret set --vault-name VAULT --name NAME-HERE --value "s3.me-central-1.amazonaws.com" |
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
export const randomRange = (min: number, max: number) => { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
}; |
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
select | |
d.oid as id, | |
d.datname AS name, | |
d.datdba AS owner_id, | |
auth.rolname AS owner_name, | |
d.datistemplate AS is_template, | |
d.datconnlimit AS connection_limit, | |
d.dattablespace AS tablespace_id, | |
ts.spcname AS tablespace_name, | |
pg_size_pretty( pg_database_size(d.datname)) as size, |
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
module "ci_vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
version = "~> 4.0" | |
name = "ci" | |
cidr = "10.0.0.0/16" | |
azs = ["${var.region}a"] | |
private_subnets = [] | |
public_subnets = ["10.0.101.0/24"] |
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
FROM ubuntu:latest | |
CMD ["bash", "-c", "while :; do echo 'just looping here... nothing special'; sleep 1; done"] |
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 | |
if command -v docker &> /dev/null | |
then | |
echo "Docker already installed." | |
else | |
apt update | |
apt -y install ca-certificates curl | |
install -m 0755 -d /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc |
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
pg_dump $DATABASE_URL -F c -f db.dump | |
pg_restore -d $DATABASE_URL --no-owner --role=new_owner --clean db.dump |
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
docker build --platform linux/amd64,linux/arm64/v8,darwin/arm64,darwin/amd64 -f pgvector-with-postgis.Dockerfile -t pgvg . |
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
curl -kO https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/shield/2.4.6/shield-2.4.6.zip | |
curl -kO https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/shield/2.4.6/shield-2.4.6.zip.sha1 | |
curl -kO https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.4.6/license-2.4.6.zip | |
curl -kO https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.4.6/license-2.4.6.zip.sha1 | |
./bin/plugin install file:///usr/share/elasticsearch/downloads/license-2.4.6.zip | |
./bin/plugin install file:///usr/share/elasticsearch/downloads/shield-2.4.6.zip |
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
ffmpeg -i bubble-01-modeling.mp4 -vf subtitles=bubble-01-modeling.srt output.mp4 |
NewerOlder