Skip to content

Instantly share code, notes, and snippets.

View dalmosantos's full-sized avatar

Dalmo Santos dalmosantos

View GitHub Profile
@mhiro2
mhiro2 / Vagrantfile
Last active January 2, 2021 18:45
CentOS k8s cluster with vagrant-libvirt
# -*- mode: ruby -*-
# vi: set ft=ruby :
$master_cpus = 2
$master_memory = 2048
$num_workers = 3
$worker_cpus = 4
$worker_memory = 4096
$common_script = <<-SCRIPT
@ArtBIT
ArtBIT / thou shall not pusg merge commits.txt
Last active March 25, 2025 02:25
PUSH REJECTED BY EVIL DRAGON BUREAUCRATS
+---------------------------------------------------------------+
| * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
+---------------------------------------------------------------+
\
\ ^ /^
\ / \ // \
\ |\___/| / \// .\
\ /V V \__ / // | \ \ *----*
/ / \/_/ // | \ \ \ |
@___@` \/_ // | \ \ \/\ \
@danielepolencic
danielepolencic / README.md
Last active October 27, 2024 08:34
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@merikan
merikan / Jenkinsfile
Last active April 16, 2025 07:30
Some Jenkinsfile examples
Some Jenkinsfile examples
pipeline {
// run on jenkins nodes tha has java 8 label
agent { label 'java8' }
// global env variables
environment {
EMAIL_RECIPIENTS = '[email protected]'
}
stages {
stage('Build with unit testing') {
@kydouglas
kydouglas / elk.sh
Last active December 12, 2023 12:58 — forked from abhishektomar/elk.sh
Bash Script to Install Elastic Search, Logstash and Kibana
#!/bin/bash
#ONE LINE
#sudo wget -Nnv 'https://gist.githubusercontent.com/kydouglas/1f68d69e856fd6d7dc223f8e1f5ae3b3/raw/f8c3b22b9d9c41093150b96c815776956b523d9d/elk.sh' && bash elk.sh && rm -f elk.sh
# Checking whether user has enough permission to run this script
sudo -n true
if [ $? -ne 0 ]
then
echo "This script requires user to have passwordless sudo access"
def getProjectName() {
return 'JenkinsPipeline'
}
def getJDKVersion() {
return 'jdk1.8.0_101'
}
def getMavenConfig() {
return 'maven-config'
@matzegebbe
matzegebbe / clean_docker_nexus.sh
Last active March 25, 2025 14:46
Nexus Repository Manager keep the last X docker images delete all other
#!/bin/bash
REPO_URL="https://repository.xxx.net/repository/"
USER="admin"
PASSWORD="datpassword"
BUCKET="portal-docker"
KEEP_IMAGES=10
IMAGES=$(curl --silent -X GET -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -u ${USER}:${PASSWORD} "${REPO_URL}${BUCKET}/v2/_catalog" | jq .repositories | jq -r '.[]' )
#!/usr/bin/env groovy
// Deploy Hello World Service Stack
node('java') {
properties([parameters([
choice(choices: ["ci", "dev", "test", "uat"].join("\n"),
description: 'Environment', name: 'ENVIRONMENT')
])])
stage('Git Checkout') {
@AAber
AAber / disk_used_alert2slack
Created June 14, 2017 13:38
Script to monitor disk space and alert via slack when disk usage is > 80% Place the script in /etc/cron.hourly
#!/bin/bash
# Parse df selected output
df -h|egrep -v 'File|tmpfs|docker|udev'| \
while read LINE; do
USED_NUMBER=`echo $LINE |awk '{print $5}'|sed 's/\%//'|sed 's/ //g'`
USED_PERCENT=`echo $LINE |awk '{print $5}'|sed 's/ //g'`
MOUNT_POINT=`echo $LINE |awk '{print $6}'|sed 's/ //g'`
if [ $USED_NUMBER -gt 80 ]; then
# Create message without spaces