Skip to content

Instantly share code, notes, and snippets.

@doppiomacchiatto
doppiomacchiatto / installScala_Docker.txt
Last active August 28, 2023 15:00 — forked from mohnoor94/installScala.txt
Install Scala and SBT using apt on Ubuntu or any Debian derivative using apt
## Install Java
RUN apt update
ENV JAVA_HOME=/opt/java/openjdk
COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME #New Docker feature, we are copying the SDK from another Docker Image
ENV PATH="${JAVA_HOME}/bin:${PATH}"
# Install Scala
RUN apt remove scala-library scala
RUN wget --no-verbose -O http://scala-lang.org/files/archive/scala-2.13.1.deb
RUN dpkg -i scala-2.13.1.deb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@doppiomacchiatto
doppiomacchiatto / Jenkinsfile
Created September 22, 2022 23:05 — forked from nickforce/Jenkinsfile
Sample Jenkinsfile with Parameter based SFDX Deployment
#!groovy
pipeline {
agent any
options {
timeout(time: 5, unit: 'MINUTES') // timeout all agents on pipeline if not complete in 5 minutes or less.
}
parameters {
@doppiomacchiatto
doppiomacchiatto / LettuceRedisClientConnectionPooling.java
Created August 31, 2021 16:17 — forked from riteshmodi/LettuceRedisClientConnectionPooling.java
Lettuce Redis Connection pooling through Spring RedisTemplate
import org.apache.commons.pool.impl.GenericObjectPool.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.lettuce.DefaultLettucePool;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
@Component
public class LettuceRedisClientConnectionPooling {
@Manikandan-K
Manikandan-K / Dockerfile
Created March 30, 2021 09:27
alpine gradle chrome
FROM alpine:3.13
CMD ["/bin/sh"]
ENV LANG=C.UTF-8
RUN { echo '#!/bin/sh'; echo 'set -e'; echo; echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; } > /usr/local/bin/docker-java-home && chmod +x /usr/local/bin/docker-java-home
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
ENV JAVA_VERSION=8u282
ENV JAVA_ALPINE_VERSION=8.282.08-r0
RUN set -x && apk add --no-cache openjdk8 && [ "$JAVA_HOME" = "$(docker-java-home)" ]
RUN apk update
@doppiomacchiatto
doppiomacchiatto / -Terminal and Oh My Zsh.md
Created October 9, 2020 14:13
OS X Terminal and Oh My Zsh configuration

Readme

  • Install Oh My Zsh
    • Add the theme file martinbuberl.zsh-theme to ~/.oh-my-zsh/themes
    • Open the configuration file ~/.zshrc (via Terminal $ ls -al and $ subl .zshrc)
      • Set theme to ZSH_THEME=martinbuberl
      • Set plugins to plugins=(bower brew git npm nyan sublime)
  • Import/Use with Terminal profile martinbuberl.terminal
  • Type upgrade_oh_my_zsh to update Oh My Zsh
  • Type touch .hushlogin to remove the "Last login" message
@doppiomacchiatto
doppiomacchiatto / zshenv.sh
Created August 27, 2020 00:56 — forked from wisq/zshenv.sh
My zshrc & zshenv
# Custom PATH to avoid every utility prepending more duplicate entries to it:
export PATH="$HOME/bin:$HOME/.rbenv/shims:$HOME/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
@juanje
juanje / podman_comands.sh
Created June 10, 2020 14:53
Run Redis with Podman. As a Systemd service and as a Pod.
# This is a simple example of how to run a basic service inside a container with Podman
# Podman
## Pull the Docker image
podman pull docker.io/redis
## Run the container as you would do with Docker
podman run -d --name redis_server -p 6379:6379 redis
# But Podman facilitate some extra ways:

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@doppiomacchiatto
doppiomacchiatto / docker-destroy-all.sh
Last active May 24, 2018 20:04 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi -f $(docker images -q)