Skip to content

Instantly share code, notes, and snippets.

View rauleite's full-sized avatar
🏠
Working from home

Raul rauleite

🏠
Working from home
View GitHub Profile
@Theaxiom
Theaxiom / Building a Pull-Through Cache in Flutter with Drift, Firestore, and SharedPreferences.md
Last active May 28, 2025 20:49
Building a Pull-Through Cache in Flutter with Drift, Firestore, and SharedPreferences

Building a Pull-Through Cache in Flutter with Drift, Firestore, and SharedPreferences

Hey fellow Flutter and Dart Devs!

I wanted to share a pull-through caching strategy we implemented in our app, MyApp, to manage data synchronization between a remote backend (Firestore) and a local database (Drift). This approach helps reduce backend reads, provides basic offline capabilities, and offers flexibility in data handling.

The Goal

Create a system where the app prioritizes fetching data from a local Drift database. If the data isn't present locally or is considered stale (based on a configurable duration), it fetches from Firestore, updates the local cache, and then returns the data.

@amitbend
amitbend / nodemailer with Zoho
Last active October 17, 2022 12:32
nodemailer with Zoho
const nodemailer = require('nodemailer');
const transporter = nodemailer.createTransport({
host: 'smtp.zoho.com',
port: 465,
secure: true, //ssl
auth: {
user: '[email protected]',
pass: 'yourpassword'
}
});
@plentz
plentz / nginx.conf
Last active May 27, 2025 10:32
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048