Skip to content

Instantly share code, notes, and snippets.

package de.example.filters
import javax.inject.Inject
import akka.stream.Materializer
import play.api.mvc._
import sun.misc.BASE64Decoder
import scala.concurrent.{ExecutionContext, Future}
@janjaali
janjaali / Utils.ps1
Last active July 31, 2019 20:52
Some little helpers
# Creates zip-archives for each directory in the current path
Get-ChildItem . | ForEach-Object {
if ($_.PSIsContainer) {
$dirName = $_.Name
$zipName = "$dirName`.zip"
echo "Compress $dirName"
Compress-Archive -Path $dirName\* -DestinationPath $zipName
}
}
@janjaali
janjaali / release.md
Last active September 5, 2020 20:02
Release notes

✨ Feature

  • Feature I

🐛 Bugfixes

  • Bugfix I

⚠ Deprecated

@janjaali
janjaali / aws-cli-sqs.md
Last active March 27, 2023 15:22
Little cheatsheet for AWS CLI SQS commands

Create a FIFO queue

aws --endpoint http://localhost:9324 sqs create-queue --queue-name queue-name.fifo --attributes FifoQueue=true,MessageRetentionPeriod=1209600,ContentBasedDeduplication=false
  • MessageRetentionPeriod is set to 1209600 seconds which equals to 14 days

Send a message (file) to queue

@janjaali
janjaali / azure-cli-postgres.md
Last active April 16, 2020 12:45
Little cheatsheet for Azure Database for PostgreSQL

Create an "Azure Database for PostgreSQL"

az postgres server create --resource-group {resource_group} `
                          --name {server_name} `
                          --admin-user master `
                          --admin-password {password} `
                          --location westeurope `
                          --version 11 `
                          --sku-name B_Gen5_1 `
@janjaali
janjaali / azure-cli-cdn.md
Created January 19, 2020 11:05
Little cheatsheet for Azure CDN

Azure Content Delivery Network (CDN)

Create profile

az cdn profile create --resource-group {RESOURCE_GROUP} `
                      --name {PROFILE_NAME} `
                      --location westeurope `
                      --sku Standard_Microsoft

Creates an "Azure Container Instances" instance

az container create --resource-group {resource_group} `
                    --name {name} `
                    --location westeurope `
                    --image {docker_image} `
                    --os-type Linux `
                    --cpu 1 `
                    --memory 0.5 `
@janjaali
janjaali / docker-postgres-snapshot.md
Last active May 31, 2024 15:27
Snapshot instruction for dockerized postgres

Create snapshot of dockerized postgres

The goal of this instruction is to enable users to create Docker images that contain a predefined postgres instance with existing schema and data. We will use the official docker postgres image and mostly docker's own commands.

The first step is to setup a docker container running postgres containing t# Create snapshot of dockerized postgres

The goal of this instruction is to enable users to create Docker images that contain a predefined postgres instance with existing schema and data. We will use the official docker postgres image and mostly docker's own commands.

The first step is to setup a docker container running postgres containing the schema and data that we want to include in the created snapshot:

@janjaali
janjaali / style.plantuml
Last active February 15, 2021 12:11
PlantUML stylesheet
' Local setup: ' colors
' Store this stylesheet next to you diagrma and include with:
' !include style.plantuml
' Remote setup:
' !include https://gist.githubusercontent.com/janjaali/8c94d1b836ac30fec85595e4c29ac8eb/raw/6d3d94d78db3dd77a3b878708378d181c43fe621/style.plantuml
' colors
!$MAIN = "#176ccb"
!$WHITE = "#ffffff"
@janjaali
janjaali / .scalafix.conf
Created March 14, 2021 13:24
ScalaFix Organize Imports
// https://github.com/liancheng/scalafix-organize-imports
OrganizeImports {
blankLines = Auto
coalesceToWildcardImportThreshold = 5
expandRelative = false
groupExplicitlyImportedImplicitsSeparately = false
groupedImports = Merge
groups = [
"*"
"java."