Skip to content

Instantly share code, notes, and snippets.

View richardsonlima's full-sized avatar
:octocat:
Focusing

Richardson Lima richardsonlima

:octocat:
Focusing
View GitHub Profile
import * as cdk from '@aws-cdk/core';
import * as ec2 from "@aws-cdk/aws-ec2";
import * as ecs from "@aws-cdk/aws-ecs";
import * as ecs_patterns from "@aws-cdk/aws-ecs-patterns";
import { Cluster } from '@aws-cdk/aws-ecs';
export class CdkRichopsStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
@richardsonlima
richardsonlima / CloudFormation-WordPress_Single_Instance_With_RDS.json
Created June 26, 2020 00:59
CloudFormation-WordPress_Single_Instance_With_RDS.template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template WordPress_Single_Instance_With_RDS: WordPress is web software you can use to create a website or blog. This template installs a single-instance WordPress deployment that uses an Amazon RDS database instance for storage. It demonstrates using the AWS CloudFormation bootstrap scripts to install packages and files when an instance is launched. **WARNING** This template creates an Amazon EC2 instance and an Amazon RDS database instance. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"KeyName": {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "String",
@richardsonlima
richardsonlima / mail_body.j2
Created April 10, 2020 05:18 — forked from halberom/mail_body.j2
ansible - example of using mail module to send one email for all hosts
# templates/mail_body.j2
{% for host in play_hosts %}
The {{ host }} says {{ hostvars[host]['result']['stdout'] }}
{% endfor %}
https://www.sonarplugins.com/plsqlcop
https://www.sonarplugins.com/ldap
wget https://binaries.sonarsource.com/Distribution/sonar-java-plugin/sonar-java-plugin-6.1.0.20866.jar
wget https://binaries.sonarsource.com/Distribution/sonar-javascript-plugin/sonar-javascript-plugin-6.2.0.12043.jar
wget https://binaries.sonarsource.com/Distribution/sonar-typescript-plugin/sonar-typescript-plugin-2.1.0.4359.jar
wget https://github.com/kwoding/sonar-webdriver-plugin/releases/download/sonar-webdriver-plugin-1.0.5/sonar-webdriver-plugin-1.0.5.jar
wget https://binaries.sonarsource.com/Distribution/sonar-scm-git-plugin/sonar-scm-git-plugin-1.9.1.1834.jar
wget https://binaries.sonarsource.com/Distribution/sonar-html-plugin/sonar-html-plugin-3.2.0.2082.jar
wget https://github.com/devcon5io/mutation-analysis-plugin/releases/download/v1.5/mutation-analysis-plugin-1.5.jar
- name: add tomcat group
group:
name: tomcat
- name: add tomcat user
user:
name: tomcat
group: tomcat
home: /user/share/tomcat
createhome: no
2020-02-07 09:26:59 >> 66817097 [http-nio-8080-exec-99] ERROR c.m.j.dataaccess.sqlparser.SqlParser - Sql statement ==> select painel.*,
0 selecionado,
0 ind_acao,
PAINEL.ID_OC,
(SELECT MAX(dat_criacao) FROM REINF_PGER_LOG_MSG MSG WHERE MSG.ID_OC = PAINEL.ID_OC) DAT_LOG_MSG,
(CASE WHEN painel.cod_status_painel = '1'
THEN 1
ELSE 0
END) AS ind_enviar,
(CASE WHEN(painel.cod_status_painel = '1' OR painel.cod_status_painel = '2' OR painel.cod_status_painel = '11')
@richardsonlima
richardsonlima / Jenkinsfile
Created November 8, 2019 18:15 — forked from mrhockeymonkey/Jenkinsfile
Jenkins pipeline running a remote ansible playbook
#!groovy
pipeline {
agent any
//These params will be displayed for user input when running a build, They are also accepted by the API
parameters {
string(name: 'BUILD_HOSTNAME', description: 'The name of the server to build (from Mdb)')
string(name: 'ILO_IP', description: 'The IP address for the server ilo')
booleanParam(name: 'skipOneView', description: 'Skip the OneView stage?', defaultValue: false)
sudo yum update
sudo yum install ruby
sudo yum install wget
cd /home/ec2-user
wget https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
sudo service codedeploy-agent status
sudo service codedeploy-agent start
@richardsonlima
richardsonlima / Jenkinsfile.groovy
Created July 11, 2019 21:00 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
{
"firefox": {
"default": "latest",
"versions": {
"latest": {
"image": "selenoid/vnc:firefox_56.0",
"port": "4444",
"path": "/wd/hub",
"tmpfs": {"/tmp":"size=512m"}
}