Skip to content

Instantly share code, notes, and snippets.

View igoralves1's full-sized avatar

Igor Alves igoralves1

View GitHub Profile
Meu Dockerfile
FROM ribafs/ubuntu-maria
ENV MYSQL_ROOT_PASSWORD root
ENV MYSQL_ROOT_DATABASE testes
RUN apt-get update
EXPOSE 3306
ADD ["script.sql", "/tmp/script.sql"] # Cria o banco e muda a senha para vazia
CMD ["start-mysql"]
RUN mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE testes"
@igoralves1
igoralves1 / function.js
Last active February 12, 2020 14:23 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@igoralves1
igoralves1 / download_bolsa_familia.R
Created January 21, 2020 03:35 — forked from fernandobarbalho/download_bolsa_familia.R
Script para download de base de dados de bolsa família
#Faça download de um conjunto de tabelas do bolsa família referente a qualquer período a partir de janeiro de 2003
base_address<- "http://transparencia.gov.br/download-de-dados/bolsa-familia-pagamentos/"
#Alterar as variáveis abaixo de acordo com o que se deseja
ano_ini<- 2018
ano_fim<- 2018
mes_ini<-1
ult_mes_disp<- 2
@igoralves1
igoralves1 / git.migrate
Created January 14, 2018 14:19 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@igoralves1
igoralves1 / Buffer Overflow Tutorial in Kali.md
Created August 7, 2017 15:11 — forked from stephen1065/Buffer Overflow Tutorial in Kali.md
Buffer overflow demonstration in Kali Linux, based on the Computerphile video
@igoralves1
igoralves1 / osx-10-10-virtualbox.md
Created November 7, 2016 04:16 — forked from frdmn/osx-10-10-virtualbox.md
Install OS X 10.10 Yosemite in VirtualBox
@igoralves1
igoralves1 / gist:1563db35bf57853a6ca7ad9491dc449d
Created July 6, 2016 01:20
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after