Skip to content

Instantly share code, notes, and snippets.

View wesleymonaro's full-sized avatar

Wesley Monaro wesleymonaro

  • Mogi das Cruzes, SP, Brazil
View GitHub Profile
@wesleymonaro
wesleymonaro / rds_stop_business_hours.py
Created September 2, 2020 01:20
rds_stop_business_hours.py
import boto3
import sys, traceback
from datetime import datetime
from time import sleep
def stop_rds_instances():
start_time = datetime.now()
# starting ec2 client for list regions
ec2_client = boto3.client('ec2')
@wesleymonaro
wesleymonaro / rds_start_business_hours.py
Created September 2, 2020 01:20
rds_start_business_hours.py
import boto3
import sys, traceback
from datetime import datetime
from time import sleep
def start_rds_instances():
start_time = datetime.now()
# starting ec2 client for list regions
ec2_client = boto3.client('ec2')
@wesleymonaro
wesleymonaro / ec2_stop_business_hours.py
Created September 2, 2020 01:17
ec2_stop_business_hours.py
import boto3
import sys, traceback
from datetime import datetime
from time import sleep
def stop_ec2_instances():
start_time = datetime.now()
ec2_client = boto3.client('ec2')
@wesleymonaro
wesleymonaro / ec2_start_business_hours.py
Created September 2, 2020 00:54
ec2_start_business_hours
import boto3
import sys, traceback
from datetime import datetime
from time import sleep
def start_ec2_instances():
start_time = datetime.now()
ec2_client = boto3.client('ec2')
@wesleymonaro
wesleymonaro / policy.json
Last active September 1, 2020 22:55
Configuração de policy para execução de lambda
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
@wesleymonaro
wesleymonaro / gulpfile.js
Last active January 29, 2019 12:35
Project base to minify SASS, CSS, JS and HTML files with Gulp.
const autoprefixer = require("gulp-autoprefixer");
const csso = require("gulp-csso");
const del = require("del");
const gulp = require("gulp");
const htmlmin = require("gulp-htmlmin");
const runSequence = require("run-sequence");
const sass = require("gulp-sass");
const uglify = require("gulp-uglify");
const cleanCSS = require("gulp-clean-css");
const rename = require("gulp-rename");
import React, { Component } from "react";
import { connect } from "react-redux";
import { compraMateriais } from "./action";
class HomeComponent extends Component {
render() {
const { materiais, compraMateriais } = this.props;
return (
import React, { Component } from "react";
import { Provider } from "react-redux";
import store from "./store";
import Home from "./home";
class App extends Component {
render() {
return (
<Provider store={store}>
import React, { Component } from "react";
import { Provider } from "react-redux";
import store from "./store";
class App extends Component {
render() {
return (
<Provider store={store}>
<div className="App">
<header className="App-header">Teste Redux</header>
import { combineReducers } from "redux";
import reducer from "./reducer";
const reducers = combineReducers({
reducer,
// caso tenha mais reducers, inclua aqui
});
export default reducers;