Skip to content

Instantly share code, notes, and snippets.

View naviat's full-sized avatar
🪲

Harry Dam naviat

🪲
View GitHub Profile
pipeline {
agent any
triggers {
bitbucketPush()
}
tools {
jdk 'OpenJDK_1_8_0'
}
@naviat
naviat / Jenkinsfile
Created April 22, 2021 03:56 — forked from mesaglio/Jenkinsfile
Jenkinsfile - Test - Package - Sonar - Quality Gate - Artifactory
pipeline {
agent any
tools {
maven 'Maven_3.6.2'
jdk 'Java_1.8u161'
}
environment {
GIT_VERSION = sh (returnStdout: true, script: 'git rev-parse HEAD | cut -c 1-10').trim()
# Maintainer: Jakub Hajek, [email protected]
#
# docker stack deploy -c stack-elastic.yml elastic
#
# The stack creates Elasticsearch cluster consiting of
# - 3 dedicated master nodes in order to keep quorum
# - 4 dedicated data nodes to manage CRUD,
#
# Docker compose file to easily deploy Elasticsearch cluster 7.x on Docker Swarm cluster.
@naviat
naviat / logging.go
Created May 21, 2021 10:38 — forked from panta/logging.go
zerolog with file log rotation (lumberjack) and console output
package logging
import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"gopkg.in/natefinch/lumberjack.v2"
"os"
"path"
"io"
)
@naviat
naviat / sources.list
Created June 23, 2021 11:07 — forked from vczb/sources.list
Ubuntu 20.04 /etc/apt/sources.list
#deb cdrom:[Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1)]/ focal main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://br.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://br.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://br.archive.ubuntu.com/ubuntu/ focal-updates main restricted
@naviat
naviat / pyenv-cheat-sheet.md
Created June 26, 2021 07:26
pyenv cheat sheet

Python environment cheatsheet

Tool for creating isolated Python environments

The common use-cases:

  • Handling different versions of same libraries per each service
  • Same plus no access to site-packages
@naviat
naviat / Dockerfile
Created June 30, 2021 16:02 — forked from migueldoctor/Dockerfile
Dockerfile including open jdk8 + maven 3.6.1 + gradle 4.0.1
FROM openjdk:8-jdk-alpine
LABEL Miguel Doctor <[email protected]>
RUN apk add --no-cache curl tar bash procps
# Downloading and installing Maven
ARG MAVEN_VERSION=3.6.1
ARG USER_HOME_DIR="/root"
ARG SHA=b4880fb7a3d81edd190a029440cdf17f308621af68475a4fe976296e71ff4a4b546dd6d8a58aaafba334d309cc11e638c52808a4b0e818fc0fd544226d952544
@naviat
naviat / Jenkinsfile
Created July 6, 2021 02:05 — forked from danielgehr/Jenkinsfile
Jenkins pipeline template with environment configuration using gitflow
// ***********************
//
// Build and deploy different environments with jenkins pipeline
//
// Merge to develop -> triggers development release
// Merge to master without tag -> triggers staging release
// Merge to master with tag -> triggers staging and production release
// Production release requires manual approval on the jenkins job
//
// Configure jenkins pipeline project to pull tags! By default, tags are not pulled!
@naviat
naviat / ssm_parameter_store.py
Created July 10, 2021 10:39 — forked from nqbao/ssm_parameter_store.py
Python class to provide a dictionary-like interface to access AWS SSM Parameter Store easily
# Copyright (c) 2018 Bao Nguyen <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@naviat
naviat / buckets.tf
Created July 10, 2021 15:47 — forked from nagelflorian/buckets.tf
Terraform config for static website hosting on AWS
# AWS S3 bucket for static hosting
resource "aws_s3_bucket" "website" {
bucket = "${var.website_bucket_name}"
acl = "public-read"
tags {
Name = "Website"
Environment = "production"
}