Skip to content

Instantly share code, notes, and snippets.

View eduardoaw's full-sized avatar

Eduardo Adams Wohlfahrt eduardoaw

View GitHub Profile
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS API Gateway with a Lambda Integration
Parameters:
lambdaFunctionName:
Type: "String"
AllowedPattern: "^[a-zA-Z0-9]+[a-zA-Z0-9-]+[a-zA-Z0-9]+$"
Description: Lambda function name. (Recommend to keep default)
Default: "lambda-api"
@eduardoaw
eduardoaw / install.ps1
Created January 28, 2021 16:50 — forked from clarencetw/install.ps1
use-cloudwatch-agent-add-ec2-instances-monitor-installation-and-teaching
cd "C:\Program Files\Amazon\AmazonCloudWatchAgent"
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a fetch-config -m ec2 -c file:"C:\Program Files\Amazon\AmazonCloudWatchAgent\config.json" -s # 重新啟動 CloudWatch Agent 並且使用本地 json 設定檔
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a start # 開啟
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a stop # 停止
PS C:\Program Files\Amazon\AmazonCloudWatchAgent> .\amazon-cloudwatch-agent-ctl.ps1 -a status # 檢查狀態
@eduardoaw
eduardoaw / reflect.py
Created July 16, 2020 01:45 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
Nomes das Tabelas
SX1 Manutenção de Perguntas de parametrização (movimentações, consultas e relatórios)
SX2 Manutenção dos Arquivos
SX3 Manutenção dos Campos
SX4 Configuração de Agenda de Relatórios e Processos
SX5 Manutenção de Tabelas
SX6 Manutenção de Parâmetros
SX7 Manutenção de Gatilhos de Campos (SX3)
SX9 Manutenção de Relacionamento entre Arquivos (SX2)
SXA Manutenção de Pastas Cadastrais dos Arquivos (SX2)
@eduardoaw
eduardoaw / NettyConnection.java
Created October 23, 2018 13:44 — forked from ochinchina/NettyConnection.java
netty client reconnect if the connection is lost or the server is not started
package com.nokia.nls.nmif;
import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
@eduardoaw
eduardoaw / client.js
Created September 21, 2018 02:02 — forked from aerrity/client.js
Node, Express & MongoDB: Button click example
console.log('Client-side code running');
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
console.log('button was clicked');
fetch('/clicked', {method: 'POST'})
.then(function(response) {
if(response.ok) {
console.log('click was recorded');
@eduardoaw
eduardoaw / start_docker_registry.bash
Created June 5, 2018 22:24 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@eduardoaw
eduardoaw / Linux Static IP
Created February 26, 2018 12:51 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@eduardoaw
eduardoaw / TUTORIAL_LETSENCRYPT_GLASSFISH4.md
Created September 25, 2017 11:23 — forked from douglasjunior/TUTORIAL_LETSENCRYPT_GLASSFISH4.md
Tutorial de instalação do Lets Encrypt no Glassfish 4.x

Tutorial de instalação do Lets Encrypt no Glassfish 4.x

Gerando certificado Lets Encrypt

Para gerar o certificado Lets Encrypt é muito simples, aqui as instruções estão baseadas em um tutorial publicado pela Locaweb. (Web archive)

Primeiro vamos criar um diretório para isso: