This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CRIANDO E CONFIGURANDO PROJETO | |
git init | |
git remote add origin git@github.com:ThiagoBarradas/my-project.git | |
# Faz modificações no projeto e faz commits etc | |
# Agora, vamos adicionar a primeira tag, fazer o merge para develop e sincronizar com o remote | |
# Assim teremos a estrutura das branches fixas | |
git tag 0.0.1 | |
git checkout -b develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CRIANDO E CONFIGURANDO PROJETO | |
git init | |
git remote add origin git@github.com:ThiagoBarradas/my-project.git | |
# Faz modificações no projeto e faz commits etc | |
# Agora, vamos adicionar a primeira tag, fazer o merge para develop e sincronizar com o remote | |
# Assim teremos a estrutura das branches fixas | |
git tag 0.0.1 | |
git checkout -b develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NewRelic | |
RUN apt-get update && apt-get install -y wget ca-certificates gnupg \ | |
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \ | |
&& wget https://download.newrelic.com/548C16BF.gpg \ | |
&& apt-key add 548C16BF.gpg \ | |
&& apt-get update \ | |
&& apt-get install -y newrelic-netcore20-agent | |
# Generic settings | |
ENV CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install openvpn openconnect | |
# Requesting password | |
sudo openconnect -u user --passwd-on-stdin vpn.example.com | |
# OR non-interactive | |
echo "<password>" | sudo openconnect --user=thiagobarradas --authgroup=MYGROUP --passwd-on-stdin vpn.xxx.com | |
# Force Stop! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// receive webhooks | |
function doPost(request) { | |
var charge = JSON.parse(request.postData.contents).data; | |
// get first page from current spreatsheet | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = spreadsheet.getSheets()[0]; | |
var result = sheet.appendRow([ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create checkouts | |
function doGet(request) { | |
var sk = "sk_xxxxxxxxxxxxxxxxxxx"; | |
var acceptedAmounts = [ "10", "50" ]; | |
var amount = request.parameter.amount; | |
if (!acceptedAmounts.includes(amount)) { | |
throw "invalid amount"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet(request) { | |
// get first page from current spreatsheet | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = spreadsheet.getSheets()[0]; | |
var result = sheet.appendRow([ | |
"doGet", | |
"sample" | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "or_loevBbzSrxCdqvRq", | |
"code": "ROJ4A1ET5Y", | |
"amount": 2990, | |
"currency": "BRL", | |
"closed": true, | |
"items": [ | |
{ | |
"id": "oi_K4g89nMs52Fa23aO", | |
"type": "product", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json=' | |
{ | |
"items": [ | |
{ | |
"amount": 2990, | |
"description": "Bola do Kiko", | |
"quantity": 1 | |
} | |
], | |
"customer": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl genrsa -out mykey.pem 4096 | |
openssl rsa -in mykey.pem -pubout > mykey.pub |