Skip to content

Instantly share code, notes, and snippets.

View Camilotk's full-sized avatar

Camilo Cunha de Azevedo Camilotk

View GitHub Profile
@Camilotk
Camilotk / nodejs-cheatsheet.js
Created September 2, 2020 06:30 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html

Aprendendo Phoenix

Trabalhando com Docker

  1. Criar a pasta do projeto, no caso blog e acessá-la
mkdir blog
cd !$
  1. Criar o DOCKERFILE
@Camilotk
Camilotk / post.md
Created June 30, 2021 17:40 — forked from vinicius73/post.md
["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

#["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

Se preparem que o texto é longo.

Várias vezes chegam novatos aqui perguntando como começar, e a galera diz "estuda lógica primeiro, depois vai pra linguagem X". Vivo dizendo que é bobagem. Ontem, em particular, falei isso, e vieram várias pessoas por inbox me perguntar porquê (e uma pra me xingar, achando que falei por arrogância).

Pra facilitar, eu vou escrever uma boa explicação de porquê "lógica de programação" é furada, doa a quem doer, e postar na APDA e no fórum da EnergyLabs (para futuras referências, porque esse assunto vai voltar, ctz).

@Camilotk
Camilotk / linkedin-unfollow-everyone.js
Created October 13, 2021 01:59 — forked from brunolemos/linkedin-unfollow-everyone.js
Unfollow everyone on Linkedin
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@Camilotk
Camilotk / pudb-add-breakpoint
Created December 24, 2021 05:41 — forked from kjordahl/pudb-add-breakpoint
Emacs lisp code to add pudb breakpoint to a python file (add to .emacs)
;; this location is "~/.pudb-bp" in older versions of pudb
(setq pudb-bp-file (expand-file-name "~/.config/pudb/saved-breakpoints"))
(defun pudb-add-breakpoint ()
(interactive)
(append-to-file
(concat "b " buffer-file-name ":"
(nth 1 (split-string (what-line))) "\n")
nil pudb-bp-file))
(define-key py-mode-map (kbd "C-c C-t") 'pudb-add-breakpoint)
#! /usr/bin/python3
HEIGHT = 15
LENGTH = 30
CSI = '\x1b[38;5;'
n = 0
for i in range(HEIGHT):
// not iterable
{
const myItem = {
a: 1,
b: 2
}
// const r = [...myItem] // TypeError: myItem is not iterable
}
// now object is iterable
@Camilotk
Camilotk / clojure-beginner.md
Created April 18, 2022 23:29 — forked from yogthos/clojure-beginner.md
Clojure beginner resources

Introductory resources

#! /usr/bin/python3
import sqlite3
import os
import subprocess
import sys
from datetime import datetime
if len(sys.argv) > 1:
conn = sqlite3.connect(f'/tmp/{sys.argv[1]}.sqlite')