Skip to content

Instantly share code, notes, and snippets.

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

Igor Souza igordcsouza

🏠
Working from home
View GitHub Profile
provider "digitalocean" {}
provider "aws" {
version = "~> 2.0"
region = "us-east-1"
}
terraform {
backend "s3" {
bucket = "icf-tfstates-terraform"
key = "terratest/terraformt.tfstate"
region = "us-east-1"
name: Review Apps
on:
pull_request:
types: [assigned, opened, synchronize, reopened, closed]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run a one-line script
version: '2'
services:
mongodb:
image: mongo:3
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.6.1
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
alias terraform='docker run -it -v $(pwd):/app/ -v /home/$(id -un)/.ssh:/.ssh -v /home/$(id -un)/.gitconfig:/etc/gitconfig -v /home/$(id -un)/.ssh/:/root/.ssh/ -v /home/$(id -un)/tf-modules/:/app/tf-modules/ -w /app/ -e AWS_ACCESS_KEY_ID=$MY_AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$MY_AWS_SECRET_ACCESS_KEY hashicorp/terraform:0.12.4'
@igordcsouza
igordcsouza / ansible-variable-precedence.md
Last active September 26, 2018 11:04
Ansible variable precedence from most to least important!
require 'telegram/bot'
require 'swgem'
token = ''
Telegram::Bot::Client.run(token) do |bot|
bot.listen do |message|
if message.text.include? ("/start")
bot.api.send_message(chat_id: message.chat.id, text: "How can i help u?")
bot.api.send_message(chat_id: message.chat.id, text: "If u need, just do /help")
elsif message.text.include? "test"
answers = Telegram::Bot::Types::ReplyKeyboardMarkup
.new(keyboard: [%w(/foo /bar)], one_time_keyboard: false)
bot.api.send_message(chat_id: message.chat.id, text: "How can i help you?", reply_markup: answers
end
# https://simpleror.wordpress.com/2009/03/15/q-q-w-w-x-r-s/
# https://core.telegram.org/bots/api#keyboardbutton
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.uff.dw;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/customer.tbl' into table CUSTOMER fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/nation.tbl' into table NATION fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/part.tbl' into table PART fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/region.tbl' into table REGION fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/lineitem.tbl' into table LINEITEM fields terminated by '|' lines terminated by '\n';
load data local infile '/Users/isouza/Google Drive/2016_1/PBD/tpch_2_17_0/dbgen/005/orders.tbl' into table ORDERS fields terminated by '|' lines terminated by '\n';
load data local infile '/Users
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package calculadora;
import java.util.Scanner;
public class Calculadora {