Skip to content

Instantly share code, notes, and snippets.

View Michel-Alves's full-sized avatar

Michel Alves Michel-Alves

  • São Paulo, Brasil
View GitHub Profile
@Michel-Alves
Michel-Alves / publickey-git-error.markdown
Created July 12, 2020 00:52 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
@Michel-Alves
Michel-Alves / clojure.clj
Last active June 16, 2023 20:37
[clojure] Receitas, padrões e tutoriais. #clojure #functionalprogramming
; Clojure API: https://clojure.github.io/clojure/clojure.core-api.html
; Estrutura Geral
(arg1 ... argn) ; arg1 é o que queremos executar e os demais parâmetros para essa execução.
; Estrutura de funções
(defn nome
"Documentação"
[array-de-argumentos]
(CORPO1) ; pode ser um def, execução de função, ou qualquer outro tipo de instrução
@Michel-Alves
Michel-Alves / JSGP_3_Objetos.js
Last active March 14, 2020 20:32
[Javascript] Receitas, tutoriais e padrões js. #js #javascript
// 3. Objetos
//3.1 Objetos
//novo objeto
var myObject = {}; //objeto vazio
var stooge = {
"first-name" : "Jerome",
"last-name" : "Howard"
};
//objeto aninhado
var flight = {
@Michel-Alves
Michel-Alves / atalhos_gnome.md
Last active February 28, 2020 16:51
[Atalhos de teclado] Atalhos de teclado em diversas aplicações para evitar uso do mouse. #mouse-free #keyboard-shortcuts #cheat-sheet #starred

Atalhos Gnome

Janelas

Ctrl + H: Esconde Janela.

Super + D: Minimiza tudo - mostrar desktop.

Outros

@Michel-Alves
Michel-Alves / kotlin_standard_functions_decision_tree.md
Last active March 3, 2020 18:07
[Kotlin - Standard Functions] Usando Kotlin Standard Functions #Kotlin
@Michel-Alves
Michel-Alves / navegacao.md
Last active June 6, 2020 20:41
[Intellij] Dicas e tutoriais da melhor IDE de todos os tempos da última semana. #intellij

Arquivos

Alt+1 Abre e muda o foco para seção de projetos ou minimiza se já estiver aberta.

Esc para voltar foco para o código.

Ctrl+Shift+I Mostra prévia do arquivo sem precisar abri-lo.

F2 Vai para o primeiro arquivo com erro dentro da pasta aberta.

**Tecla de Ativação**
`ALT + M` (ou `ALT` + `SHIFT` + `M`)
**Combinações**
`ALT + M` `1` - Última ação realizada.
**Escape/Unescape**
- Java `2 depois 1 ou 2`
- JSON `2 depois 8 ou 9`
@Michel-Alves
Michel-Alves / Nomes_para_funcoes_fabrica.md
Last active July 11, 2020 23:57
[Nomeação de funções de Fábrica] Padrões para nomeação de funções que têm o objetivo de criar objetos.As dicas foram estraídas do livro Effective Kotlin e por isso tem exemplos nesta linguagem porém não os nomes podem ser usados em qualquer linguagem. #Kotlin #clean-code #java

Nomes para funções de fábrica

Referência: Effective Kotlin Item 30.

from - Uma função de conversão de tipo que recebe um parâmetro e retorna uma instância correspondente do mesmo tipo:

val date: Date = Date.from(instant)

@Michel-Alves
Michel-Alves / systemctl list-unit-files.txt
Created August 16, 2018 12:10
Result of command $ systemctl list-unit-files
UNIT FILE STATE
proc-sys-fs-binfmt_misc.automount static
-.mount generated
dev-hugepages.mount static
dev-mqueue.mount static
proc-sys-fs-binfmt_misc.mount static
snap-core-4830.mount enabled
snap-core-4917.mount enabled
snap-core-5145.mount enabled
snap-freeplane\x2dmindmapping-4.mount enabled