Skip to content

Instantly share code, notes, and snippets.

View DrNotThatEvil's full-sized avatar

Willmar Knikker DrNotThatEvil

  • The Netherlands
View GitHub Profile
@jenschr
jenschr / DeleteAllFilesAndFolderOnSDCard.ino
Last active February 3, 2023 14:26
Delete all files on an SD card (Arduino/SPI)
#include <SD.h>
const int SDChipSelect = 4; // SS pin on the SD card.
// Other pins connected to normal SPI
File root;
int DeletedCount = 0;
int FolderDeleteCount = 0;
int FailCount = 0;
String rootpath = "/";
@ericdouglas
ericdouglas / super-tip.txt
Last active February 25, 2024 10:09
Change 4 spaces to 2 spaces indentation and change tab to spaces - Vim tip
// 4 spaces to 2 spaces
%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g
// Tab to 2 spaces
:%s/\t/ /g