Skip to content

Instantly share code, notes, and snippets.

View fernandovmacedo's full-sized avatar

Fernando Macedo fernandovmacedo

  • Brasília, Brasil
View GitHub Profile
@fernandovmacedo
fernandovmacedo / gptlog2md.sh
Last active April 25, 2024 20:53
Convert gpt-cli logs to markdown
#!/usr/bin/env bash
help="Convert chat-gpt cli logs to markdown.
No args. Use STDIN and STDOUT
Requires ripgrep
Usage example using bat for formatting:
$0 < logfile | bat -l md -p"
main() {
@fernandovmacedo
fernandovmacedo / keyboard.md
Created June 10, 2023 16:08 — forked from ericdouglas/keyboard.md
Cedilla under C (ç) in 'US international' keyboard layout in Linux

Add English (US, alt. intl.)

It's because the cedilla module isn't loaded by default when the locale is set to en, so you have to change the configuration files for gtk to add them:

  1. Edit configuration files:
sudo vim /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache

sudo vim /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache
@fernandovmacedo
fernandovmacedo / mount_qcow2.md
Created May 27, 2023 03:54 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@fernandovmacedo
fernandovmacedo / vscode-default-color-theme.json
Created March 14, 2023 11:10 — forked from javifm86/vscode-default-color-theme.json
Default colors used in VSCode, useful if you want to create your own theme using your color palette and want to provide similar colors to the defaults ones.
{
"name": "Default colors dark",
"type": "dark",
"colors": {
// Base colors
"focusBorder": "#007fd4",
"foreground": "#cccccc",
"widget.shadow": "#0000005c",
// "selection.background": // null
@fernandovmacedo
fernandovmacedo / index.html
Created January 3, 2021 17:59
Sass Crash Course - Landing Page Header
<header class="showcase">
<div class="container">
<nav>
<h1 class="logo">My Website</h1>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
</ul>
</nav>