Skip to content

Instantly share code, notes, and snippets.

@reatlat
Last active October 4, 2025 18:19
Show Gist options
  • Select an option

  • Save reatlat/51da08b7b36f4cb842a1ff404f513508 to your computer and use it in GitHub Desktop.

Select an option

Save reatlat/51da08b7b36f4cb842a1ff404f513508 to your computer and use it in GitHub Desktop.
Placeholder gist for the FreshJuice GitHub Gist module β€” a fruity hello-world with a random emoji 🍊 Demo here: https://demo.freshjuice.dev/modules/code-snippet-github-gist
/**
* example.js β€” placeholder gist for FreshJuice GitHub Gist module
* 🍊 FreshJuice style: squeeze out a fruity greeting
*/
function squeeze(name = 'world') {
const fruits = ['🍊', 'πŸ“', '🍍', 'πŸ₯­', 'πŸ‘'];
const pick = fruits[Math.floor(Math.random() * fruits.length)];
console.log(`FreshJuice says: Hello, ${name}! ${pick}`);
return `Hello, ${name}! ${pick}`;
}
// Export for environments that support ESM
export { squeeze };
// Or attach to global (so it's visible when embedded)
if (typeof window !== 'undefined') {
window.squeeze = squeeze;
}
@reatlat
Copy link
Author

reatlat commented Sep 30, 2025

GitHub Gist β€” Placeholder

This is a placeholder gist used as the default example in the FreshJuice GitHub Gist module.

  • Shows how the module renders an embedded gist block
  • Contains only a minimal example.js file with a simple function
  • Replace this with your own gist when using the module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment