Skip to content

Instantly share code, notes, and snippets.

@vladfatu
vladfatu / mars_mission.txt
Last active August 4, 2025 07:11
Gemma Rover mission logs
[Control Loop] Thinking with Gemma 3n...
[Control Loop] Sending prompt to model:
You are a control agent for a Mars rover. Based on the current state of the rover, decide what action it should take next.
Your mission is to complete the long running task from the current state, but should prioritize safety and operational efficiency.
Respond only with one of the following function names (as plain text):
['drop_dirt_sample', 'pick_up_dirt_sample', 'pick_up_scoop', 'pick_up_towel', 'put_scoop_back', 'put_towel_back', 'seek_shelter', 'wipe_solar_panel']
Current State:
{
"inside_base": true,
@vladfatu
vladfatu / Send transactional push notifications from a Firebase Cloud Function.js
Last active November 16, 2020 22:16
Send transactional push notifications from a Firebase Cloud Function
function sendPush(uid) {
// Get the user from Firestore
const getDeviceTokensPromise = admin.firestore()
.collection('users').doc(uid).get();
// Get the User profile from Firebase Auth
const getUserProfilePromise = admin.auth().getUser(uid);
Promise.all([getDeviceTokensPromise, getUserProfilePromise])