Skip to content

Instantly share code, notes, and snippets.

@camposdelima
camposdelima / DeserializeBase64String.java
Created May 17, 2019 14:49
Deserialize Base 64 string
//*******************************************************************
// Welcome to CompileJava!
// If you experience any issues, please contact us ('More Info') -->
// Sorry that the "Paste" feature no longer works! GitHub broke it.
//*******************************************************************
import java.lang.Math; // headers MUST be above the first class
import java.util.Date;
// one class needs to have a main() method
@camposdelima
camposdelima / krakend.json
Last active November 2, 2019 03:30
krakend example
{
"version": 2,
"extra_config": {
"github_com/devopsfaith/krakend-gologging": {
"level": "INFO",
"prefix": "[KRAKEND]",
"syslog": false,
"stdout": true,
"format": "default"
},
@camposdelima
camposdelima / indexes.sql
Created January 23, 2020 16:17
CAMUNDA UTIL INDEXES
CREATE INDEX act_idx_hi_act_inst_name ON public.act_hi_actinst USING btree (act_name_);
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
<WillShowUI>Never</WillShowUI>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<iframe src="https://www.w3schools.com" title="W3Schools Free Online Web Tutorials"></iframe>
{
"meta": {
"theme": "stackoverflow"
},
"basics": {
"name": "Cristiano Campos",
"label": "SRE / Cloud / DevOps / Coordenador de operações na Akiva Software",
"image": "https://avatars.githubusercontent.com/u/10823120?v=4",
"email": "cristiano.campos@outlook.com",
"phone": "+5511981351314",
@camposdelima
camposdelima / spot-supervisor.yaml
Last active November 17, 2023 08:04
How remove spot taints from AKS nodepools and maintain the spot nodes without taints
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: spot-supervisor
labels:
app.kubernetes.io/instance: spot-supervisor
spec:
selector:
matchLabels:
name: spot-supervisor
@camposdelima
camposdelima / prune.sh
Created August 1, 2022 02:36
Generate prune script to default vpc aws
export REGIONS=$(aws ec2 describe-regions | jq -r ".Regions[].RegionName ")
for region in $REGIONS ; do
echo "####### Killing $region"
# list vpcs
export IDs=$(aws --region=$region ec2 describe-vpcs | jq -r ".Vpcs[]|{is_default: .IsDefault, id: .VpcId} | select(.is_default) | .id")
for id in "$IDs" ; do
if [ -z "$id" ] ; then
continue
fi
@camposdelima
camposdelima / app_offline.htm
Created September 26, 2022 08:43
app_offline.htm
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/TweenMax.min.js"></script>