Skip to content

Instantly share code, notes, and snippets.

View maykonchagas's full-sized avatar
💭
I may be slow to respond.

Maykon Chagas maykonchagas

💭
I may be slow to respond.
View GitHub Profile
'use strict';
const number = Math.trunc(Math.random() * 20) + 1;
// Math.trunc(Math.random() * 21)
//document.querySelector('.message').textContent = 'Hello World!';
//document.querySelector('.score').textContent = 42;
document.querySelector('.number').textContent = number;
// This is a "stub" file. It's a little start on your solution.
// It's not a complete solution though; you have to write some code.
// Package twofer should have a package comment that summarizes what it's about.
// https://golang.org/doc/effective_go.html#commentary
package twofer
import "fmt"
// ShareWith should have a comment documenting it.
@maykonchagas
maykonchagas / arch-linux-install
Last active February 15, 2022 19:58 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
## Download the archiso image from https://www.archlinux.org/
## Copy to a usb-drive
$ dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
## Set brazilian portuguese keymap
# Pull base image
FROM python:3
# Set environment varibles
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
RUN mkdir /backend-challenge
COPY . /backend-challenge/
version: '3.3'
services:
db:
image: postgres:10.1-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
web:
build: .
command: python manage.py runserver 0.0.0.0:8990
$ docker-compose exec owncloud php occ app:list oc 88e12cc ✗
An unhandled exception has been thrown:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.appconfig' doesn't exist in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PD
@maykonchagas
maykonchagas / aprendendo-git.md
Last active July 25, 2019 20:06
Gist sobre git, e um cheat-sheet pra mim. Mas se quiser, sinta-se a vontade pra olhar.

O git é o que chamamos, dentro do mundo de desenvolvimento/computação, um sistema de controle de versões, e é interessante que criemos o hábito de trabalhar com ele de forma minimamente eficiente, isso irá colaborar com um repositório de fácil leitura e compreensão (principalmente se formos trabalhar de forma colabotariva).

Como esse registro não tem o propósito de ensinar o passo a passo do git, e se você não souber absolutamente nada sobre, recomendo iniciar pelo Git Handbook (1) e depois pode dar uma olhada também nesse material do Learning Git Branching (2), e para testar para além do tutorial pode ser utilizado o Visualizing Git (3). Eles providenciarão uma boa visão sobre o básico-intermediário do git.

Um pouco do que está aqui embaixo é com base nesses dois materiais e também nesse documento Git Cheat Sheets ([4](https://services.github.com/on-demand/res

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD5omSutEcM7mUZEwVZCl40IiS0ERfnOFlGv3v3ZHc+eF8Xaw1ghnpRovg+hhCTSdrS6d+s4Olc7Ap9WHeUl2EAyhezbQ36pFe+14YRgv1QkK8v/OwwnPBkFylH7wvGPbruOmdvWyxuQMsjCcMrHfYIcHsF8Cz71XGN2TzhQu5pIDqWpU+3Xd4vIRxl6XjGhad6r0JjgaAOiNfxBFyoq0Cm9n9s0yguBojiScO6wHwCp4IWucEeBbdLyFpo1uSpUaW7tyZgxv00Xek4rZ85r9Jjmlkdvtohu57ewI3oA1TfHNNmb4C9yxurj56s12kNZI+lp2DXYfuBekntvtiYdBf0ZJEZv3VPPBbXZwRxyc5OxXTRM4d6A4SBuTp/R8noD4dMuGQAb3QskCJxQoleCiUGKDbRw6bq9iMc+Xy4o1txc9HRcMg3ig1O2Yix2diEDCZ9yZahN2qxQWs1fEZhtKfaLG7INlyNEZBXA3CLSr/XHMJxjQnSAPCe7LdSAdR/4w3vFxsn7fuAH3hZB7O+lH8bH/xCQFfbgQeyYGqJ8d+k49Va6CYxnvV2UHdjPDFFseDWNUXwQFQTe29T6uPj0Oa4oOISxqV3sk+OqwjAwyZzz2rnLXCR2LcglHtRfUv6sQiFsumo5OFoB8P1g02JlhtzkDMEV5GV0hyd7Eb3bshPVQ== maykon@lovelace
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHrXI4t7Pu/3d1M5ompLdcjKuGUyyXsb54yMsmmVwr/wprQKrSF8sYa0iQLnDhOtG1h61EcCXfnlU02xEVXrwTxtbu4P1t734Mx8+OoQ6OqvF04ezLMCIiTW138tt7gGcMLvJtOON4EF7wXAPNnFQV5FrzJrcDG12JGH4DbHAsM39m/3Ab48TPmrxpHwtbFL525JVip4Gcgc0iowhgcCQ4JZntZCFnkNHkE56ItjWhiv5nldfIwnc
@maykonchagas
maykonchagas / diceware.wordlist.pt.txt
Created November 13, 2017 22:33 — forked from patxipierce/diceware.wordlist.pt.txt
A diceware wordlist for the Portuguese language.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
11111 a
11112 aa
11113 aaa
11114 aaaa
11115 ab
11116 aba
11121 abaco

Keybase proof

I hereby claim:

  • I am mchagas on github.
  • I am mchagas (https://keybase.io/mchagas) on keybase.
  • I have a public key ASBmQlmidt31Xjq9hwNcr3J1y1MsmnhUm51hL35InwMJkwo

To claim this, I am signing this object: