Skip to content

Instantly share code, notes, and snippets.

View edo9k's full-sized avatar
🦝

Eduardo França edo9k

🦝
View GitHub Profile
@d2s
d2s / install-spell-checker-to-vs-code.md
Last active August 12, 2024 19:25
Installing spell checker to VS Code

Spelling Checker for Visual Studio Code

  • README of the code-spell-checker VS Code extension.

Installing spell checker to VS Code

  • Open up VS Code
  • Press button F1
  • Type ext install code-spell-checker to the command promnt and press Enter key.
@romainl
romainl / vanilla-linter.md
Last active April 20, 2025 07:00
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.

#![feature(lang_items)]
#![no_std]
#[no_mangle]
pub fn add_one(x: i32) -> i32 {
x + 1
}
// needed for no_std
@falvarez
falvarez / docker-shell.sh
Created January 24, 2018 08:10
Run docker container, mount current working directory and get interactive shell
docker run -ti -v $(pwd):/tmp DOCKER_IMAGE /bin/bash
@jdeathe
jdeathe / centos-wildcard-certbot.md
Last active November 29, 2021 10:33
Installation and Usage of Certbot on CentOS to Obtain a Let’s Encrypt Wildcard TLS/SSL Certificate.

Requesting a Wildcard Certificate with Certbot on CentOS

To request a Let's Encrypt wildcard certificate there are the following prerequisites:

  • The client must support ACME v2 (i.e Certbot >= 0.22.0)
  • The DNS-01 challenge type must be used.
  • The --server option or configuration directive must be changed to the appropriate v2 endpoint.

Installation

Install certbot-auto

Introdução aos Tipos Dependentes

Overview

No mundo da programação funcional, uma ideia introduzida há algum tempo vem ganahando força. É a tipagem dependente: tipos que dependem de valores. O tipo de par ordenado (n : Natural) ⨯ (Vetor a n) é um exemplo de tipo dependente. O primeiro elemento do par é um número natural n. O segundo elemento é um vetor que armazena valores do tipo a e cujo tamanho é aquele mesmo número natural n. Estabelecemos uma relação de dependência entre um tipo e um valor. O primeiro elemento do par é sempre o tamanho do vetor.

@doppioandante
doppioandante / binary_calc.vhd
Created October 3, 2018 14:02
simple vhdl calculator
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity binary_calc is
port (
input1: in std_logic_vector(4 downto 0); -- first 5-bit input number
input2: in std_logic_vector(4 downto 0); -- second 5-bit input number
@verticalgrain
verticalgrain / chip-flashing-guide-nov-2018.md
Last active May 2, 2025 14:36
NextThingCo C.H.I.P. Flashing guide as of November, 2018

Below are the steps required to flash a NextThingCo CHIP or PocketCHIP from the command line, as of November 2018. The web flasher no longer works, and there are numerous errors when flashing from the command line, mostly due to broken dependencies. The following method works for flashing a CHIP as of November 2018:

Note: Flashing must be done on Linux. Tested on Ubuntu and Rasparian. Mac OS seems to not work.

  1. Download and unpack the CHIP-SDK.zip from one of the following:
  1. Download and unpack CHIP-tools.zip from one of the following:
@AndrewKvalheim
AndrewKvalheim / mastodon-notes.md
Last active February 9, 2024 18:30
Notes on running a personal Mastodon instance

Personal Mastodon instance

Effective total cost: $3–5/mo

Setup

Decide on an EC2 instance type:

  1. At AWS Console → EC2 → Instance Types, filter for ≥1 GB RAM and sort by price.
  • t4g.micro is lowest.
@divarvel
divarvel / Tumble.hs
Last active December 26, 2021 15:37
#!/usr/bin/env stack
-- stack --resolver lts-14.20 --install-ghc ghci --package containers --package mtl --package optics
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedLabels #-}