Skip to content

Instantly share code, notes, and snippets.

@giuliocorradini
giuliocorradini / install-fonts.sh
Created October 26, 2023 15:56
Install multiple fonts in subdirectories on macOS
#!/bin/bash
# This script helps you to install a font where its variants are stored in different directories.
for file in *; do
if [ -d $file ]; then
echo $file
cd $file
open *
cd ..;
@giuliocorradini
giuliocorradini / esp-idf-vscode-intellisense.md
Created March 16, 2022 20:01
Configure IntelliSense with Espressif IDE extension for VSCode

Configuration of c_cpp_properties.json file

The C/C++ Extension is used to provide C and C++ syntax highlight, code navigation and Go to declaration/definition within C and C++ files. The default configuration file is located in {PROJECT_DIR}/.vscode/c_cpp_properties.json and can be generated by using ESP-IDF: Create project from extension template command or using the ESP-IDF: Add vscode configuration folder command.

Why configure this file?

To enable Code Navigation, auto-complete and other language support features on ESP-IDF source files on Visual Studio Code. Please take a look at C/C++ Configurations for more detail about c_cpp_properties.json configuration fields.

Default configuration

The sectioning levels have the following numbers:

-1 part
0 chapter     
1 section       
2 subsection  
3 subsubsection
4 paragraph
5 subparagraph
@giuliocorradini
giuliocorradini / androidtv_40_custom.sh
Created April 10, 2021 21:00
grub.d config file for Android TV boot menuentry, without VIRT_WIFI support
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Android TV" {
set root=(hd0,4)
linux /android-2020-03-30/kernel root=/dev/ram0 verbose androidboot.selinux=permissive CONFIG_VIRT_WIFI=n vmalloc=256M
initrd /android-2020-03-30/initrd.img
@giuliocorradini
giuliocorradini / dump_check_bios.ino
Created April 4, 2021 20:53
Dump and check bios for Intel DH61 Motherboard
#include <Arduino.h>
#include "SPIMemory.h"
#include <SPI.h>
#include <SD.h>
#define BLOCK_SIZE 1024
SPIClass hspi(HSPI);
SPIClass vspi(VSPI);
@giuliocorradini
giuliocorradini / weewx_virtualenv.md
Created April 3, 2021 17:06
Install weewx in python3 virtualenv

Install WeeWX in Python3 Virtualenv on Debian 9 and derivatives

Install python3

sudo apt install python3 python3-pip

Generate a virtualenv for WeeWX