Skip to content

Instantly share code, notes, and snippets.

View katesclau's full-sized avatar
🏠
Working from home

Diego Rodrigues Ferreira katesclau

🏠
Working from home
View GitHub Profile
@katesclau
katesclau / push.sh
Created September 15, 2021 18:15
Push script to add, commit and push in a single action
#! /bin/bash
## Ref: https://www.redhat.com/sysadmin/arguments-options-bash-scripts
############################################################
# Help #
############################################################
Help()
{
# Display Help
@katesclau
katesclau / buildLayers.sh
Created August 20, 2021 19:35
buildLayers.sh - Script to build NodeJS Lambda Layers for Serverless projects
###
# Script to build the Lambda Layers based on libs used by functions.
# Assumptions...
# - your functions are all inside ./functions
# - you don't need specific versions of the dependecies
###
#!/bin/bash
echo "======================================="
@katesclau
katesclau / scadabr-service-setup.sh
Last active July 31, 2021 02:15
ScadaBR service configuration script for Debian
#!/bin/bash
echo -e \
"############################################# \n \
# SCADABR / SCADALTS SERVICE CONFIGURATION \n \
# Installs prerequisits and ScadaBR/LTS \n \
# as service for Debian like environments \n \
# \n \
# Tested on: \n \
# - Debian 4.19.67 \n \

Keybase proof

I hereby claim:

  • I am katesclau on github.
  • I am diegoferreira (https://keybase.io/diegoferreira) on keybase.
  • I have a public key whose fingerprint is B5D7 8B65 93E4 0CC5 156F 5F73 3405 1A60 B772 ADC5

To claim this, I am signing this object:

@katesclau
katesclau / prisma-interface.graphql
Last active November 19, 2018 20:59 — forked from tibotiber/prisma-interface.graphql
Presents a different approach on how to implement Interfaces with Prisma
type ICharacter {
# interface
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
# any custom fields inside JSON
implemented: String
}
interface Character {
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
}
type Human implements Character {
id: ID!
name: String!
@katesclau
katesclau / DEVELOPMENT.md
Created March 20, 2017 14:14
Scada-LTS getting started on Dev
# Policy and Alarm for high usage
resource "aws_autoscaling_policy" "up_policy" {
name = "${var.cluster_name}-up-policy"
scaling_adjustment = 1
adjustment_type = "ChangeInCapacity"
cooldown = 300
autoscaling_group_name = "${aws_autoscaling_group.asg.name}"
}
# App Stickiness Policy
resource "aws_app_cookie_stickiness_policy" "ssl_app_stickiness" {
name = "${var.elb_name}-ssl-stickiness"
load_balancer = "${aws_elb.classic_elb.id}"
lb_port = 443
cookie_name = "${var.session_cookie}"
}
# ELB Stickiness policy
resource "aws_lb_cookie_stickiness_policy" "lb_stickiness" {
resource "aws_iam_server_certificate" "tutorial_cert" {
name_prefix = "${var.elb_name}-cert"
certificate_body = "${file(${var.cert_file})}"
private_key = "${file(${var.key_file})}"
lifecycle {
create_before_destroy = true
}
}