Skip to content

Instantly share code, notes, and snippets.

View dalmosantos's full-sized avatar

Dalmo Santos dalmosantos

View GitHub Profile
@dalmosantos
dalmosantos / git log
Created May 4, 2020 05:31
git log --pretty
git log --pretty --date-order -C -M --pretty=format:"<%h> %ad [%an] %Cgreen%d%Creset %s" --all --date=short --max-count=10
git log     --pretty=format:'{%n  "commit": "%H",%n  "author": "%aN <%aE>",%n  "date": "%ad",%n  "message": "%f"%n},' --max-count=10  $@ |     perl -pe 'BEGIN{print "["}; END{print "]\n"}' |     perl -pe 's/},]/}]/'
@dalmosantos
dalmosantos / gist:51c8b42ea159ff4fdd7025f993c0bc3f
Created May 4, 2020 05:16 — forked from avelino/gist:3188137
shell script, como colorir o retorno do seu código
echo -e " \033[0;30m Preto \033[0m --> 0;30 "
echo -e " \033[0;31m Vermelho \033[0m --> 0;31 "
echo -e " \033[0;32m Verde \033[0m --> 0;32 "
echo -e " \033[0;33m Marrom \033[0m --> 0;33 "
echo -e " \033[0;34m Azul \033[0m --> 0;34 "
echo -e " \033[0;35m Purple \033[0m --> 0;35 "
echo -e " \033[0;36m Cyan \033[0m --> 0;36 "
echo -e " \033[0;37m Cinza Claro \033[0m --> 0;37 "
echo -e " \033[1;30m Preto Acinzentado \033[0m --> 1;30 "
echo -e " \033[1;31m Vermelho Claro \033[0m --> 1;31 "
@dalmosantos
dalmosantos / vagrant-kvm.md
Created April 20, 2020 18:03 — forked from yuanying/vagrant-kvm.md
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@dalmosantos
dalmosantos / junit-platform.properties
Created April 16, 2020 17:08
Junit 5 parallel execution
junit.jupiter.execution.parallel.enabled=true
junit.jupiter.execution.parallel.config.strategy=fixed
junit.jupiter.execution.parallel.config.fixed.parallelism=10
junit.jupiter.execution.parallel.mode.default = concurrent
FROM jenkins/jenkins:lts-slim
USER root
# install docker
RUN mkdir -p /usr/share/man/man1 && \
apt-get update ; apt-get upgrade -y && \
apt-get install --no-install-recommends -y cpio rpm2cpio zip unzip vim-tiny maven sshpass git && \
apt-get clean autoclean && \
apt-get autoremove -y && \
@dalmosantos
dalmosantos / view.sh
Created November 14, 2019 15:45
view.sh
pass="secret"
# VncViewer jars are found here: https://code.google.com/archive/p/vncthumbnailviewer/downloads
viewer_jar="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/vncthumbnailviewer/VncThumbnailViewer%201.4.2.jar"
if [ ! -f ./viewer.jar ]; then
echo "Viewer.jar not found - downloading!"
curl $viewer_jar -o viewer.jar
fi
# prompt for host ip if not provided as a 1st parameter
@dalmosantos
dalmosantos / docker-compose-selenium.yml
Last active October 29, 2022 04:50
docker-compose-selenium.yml
version: '3.7'
services:
selenium-hub:
image: selenium/hub:3.141.59-20200409
ports:
- "4444:4444"
volumes:
- /dev/shm:/dev/shm
environment:
- TZ=America/Sao_Paulo
import time
print "..."
time.sleep(1)
print "..."
print "..."
print "..."
print "..."
time.sleep(1)
print "..."
@dalmosantos
dalmosantos / tecmint_monitor.sh
Created June 27, 2019 16:20
tecmint_monitor
####################################################################################################
# Tecmint_monitor.sh #
# Written for Tecmint.com for the post www.tecmint.com/linux-server-health-monitoring-script/ #
# If any bug, report us in the link below #
# Free to use/edit/distribute the code below by #
# giving proper credit to Tecmint.com and Author #
# #
####################################################################################################
#! /bin/bash
# unset any variable which system may be using
FROM centos:6.10
ENV HTTPD_DATA_PATH=/var/www \
HTTPD_LOG_PATH=/var/log/httpd
RUN yum repolist && yum update -y && \
yum install -y yum-utils && \
yum install -y centos-release-scl epel-release && \
INSTALL_PKGS="gettext hostname nss_wrapper bind-utils httpd mod_ssl curl openssl" && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \