Skip to content

Instantly share code, notes, and snippets.

View theuves's full-sized avatar
🎯
Focusing

Matheus Alves theuves

🎯
Focusing
  • Mato Grosso do Sul, Brazil
  • 09:39 (UTC -04:00)
View GitHub Profile
#!/usr/bin
wget https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.31.5/0.31.5-linux-x64.zip -O /tmp/0.31.5-linux-x64.zip
rm -rf /usr/lib64/opera/libffmpeg.so
unzip /tmp/0.31.5-linux-x64.zip -d /usr/lib64/opera/
rm -rf /tmp/0.31.5-linux-x64.zip
variable "ssm_path" {}
data "external" "ssm_parameters" {
program = ["sh", "-c", <<EOT
raw_json=$(aws ssm get-parameters-by-path --no-with-decryption --path ${var.ssm_path})
encoded_json=$(echo $raw_json | sed 's/"/\\"/g')
echo "{\"json\": \"$encoded_json\"}"
EOT
]
}
@theuves
theuves / Makefile
Last active November 23, 2020 09:37
Makefile for Terraform.
default: validate init plan apply
validate:
terraform validate
init:
terraform init
plan:
terraform plan
@theuves
theuves / clone-all.js
Last active September 21, 2020 11:32
Get the `git clone` command of all repositories from a GitHub page.
copy([...document.querySelectorAll('[data-hovercard-type=repository]')].map(link => `git clone ${link.href}.git`).join('\n'))
get /patients
get /patients/login/:pid/birthdate/:bdt
put /patients
get /study
get /study/:acc
get /study/token/:acc
post /users
get /users/:pid
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker image rm $(docker image ls -aq)
function getChanges(oldText, newText) {
let index
for (let i in oldText) {
let charOld = oldText[i]
let charNew = newText[i]
if (charOld !== charNew) {
index = i
break
@theuves
theuves / curadoria.markdown
Last active June 14, 2020 13:51
Conteúdos que consumo regularmente na internet.
@theuves
theuves / sudo-github.js
Last active April 20, 2020 14:11
Bookmarklet para facilitar as ações de "sudo" do GitHub.
// Transfer
javascript:(function () {
const repo = window.location.pathname.replace('/settings', '').substr(1);
const user = 'theuves-lixo';
document.querySelector('#confirm_repository_name').value = repo;
document.querySelector('#confirm_new_owner').value = user;
document.querySelectorAll('[type=submit].btn-danger')[1].disabled = false
})();
@theuves
theuves / MinimalYouTube.css
Last active April 21, 2020 21:17
Estilo de YouTube minimalista (instalar com Stylish).
@-moz-document url-prefix("https://www.youtube.com/watch") {
/*
* remove
*/
ytd-live-chat-frame, /* chat em tempo real */
#related, /* vídeos relacionados */
#secondary, /* comentários */
ytd-comments, /* comentários */
#top-level-buttons > *:nth-child(2), /* botão de dislike */