Skip to content

Instantly share code, notes, and snippets.

@maciejbak85
maciejbak85 / pom.xml
Created June 8, 2022 08:49
Pom java with scala
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>eu.test</groupId>
<artifactId>tc-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test</name>
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company</groupId>
<artifactId>SwaggerPetstore</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Azure Java Functions</name>
@maciejbak85
maciejbak85 / helpful-docker-commands.sh
Created December 9, 2020 09:24 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@maciejbak85
maciejbak85 / scalafmt.conf
Created September 7, 2020 07:26
My scalafmt fav config
version = 2.2.2
style = intellij
maxColumn = 120
lineEndings = preserve
align = most
align.openParenCallSite = false
align.openParenDefnSite = false
align.tokens = [
{code = "<-"},
{code = "=>", owner = "Case"},
@maciejbak85
maciejbak85 / .conf
Created January 28, 2020 13:08
Scala fmt config
version = 2.2.2
style = intellij
maxColumn = 120
lineEndings = unix
align = most
align.openParenCallSite = false
align.openParenDefnSite = false
align.tokens = [
{code = "<-"},
{code = "=>", owner = "Case"},
server {
listen 80;
server_name forum.xyz.pl;
# redirects both www and non-www to https
return 301 https://forum.xyz.pl$request_uri;
}
server {
listen [::]:443 ssl http2;
@maciejbak85
maciejbak85 / localhost_ip_for_docker_contianer.sh
Created September 17, 2018 06:48
Connect from docker container to local machine ( not using localhost )
`ifconfig | grep 'inet 192'| awk '{ print $2}'`
@maciejbak85
maciejbak85 / TestMultipartFileUpload.scala
Created January 18, 2018 10:47 — forked from jmcardon/TestMultipartFileUpload.scala
akka-http Multipart file-upload client + server example
package akka.http.scaladsl
import java.io.File
import akka.http.scaladsl.unmarshalling.Unmarshal
import akka.util.ByteString
import scala.concurrent.duration._
import akka.actor.ActorSystem
Vboxmanage list webcams ( to get number )
VboxManage controlvm "win10" webcam attach .1
import spray.http._
import StatusCodes._
import akka.actor.Actor
import spray.routing._
import spray.http._
import MediaTypes._
import spray.routing.authentication._
import scala.concurrent.{ Future, ExecutionContext }
import ExecutionContext.Implicits.global