Skip to content

Instantly share code, notes, and snippets.

// This post referred to this git. I just trimmed cam and wifi part.
// https://github.com/v12345vtm/CameraWebserver2SD/blob/master/CameraWebserver2SD/CameraWebserver2SD.ino
#include "FS.h"
#include "SD_MMC.h"
//List dir in SD card
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
Serial.printf("Listing directory: %s\n", dirname);
@9SQ
9SQ / esp8266_WiFiClientSecure.ino
Last active May 20, 2022 04:54
Arduino core for esp8266 WiFiClientSecure
#ifdef ESP8266
extern "C" {
#include "user_interface.h"
}
#endif
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
ADC_MODE(ADC_VCC);
@simonista
simonista / .vimrc
Last active October 26, 2024 01:55
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
@mattbaggott
mattbaggott / Turnbull.R
Created November 12, 2012 15:53
Turnbull's nonparametric estimator for interval-censored data
cria.tau <- function(data){
# Giolo, Suely Ruiz. "Turnbull's nonparametric estimator for interval-censored data'."
# Department of Statistics, Federal University of Paraná (2004): 1-10.
l <- data$left
r <- data$right
tau <- sort(unique(c(l,r[is.finite(r)])))
return(tau)
}