Skip to content

Instantly share code, notes, and snippets.

@evaletolab
evaletolab / prompts-rewrite.md
Last active August 15, 2025 10:58
prompts - rewrite

30 AI Prompts that are better than “Rewrite”

*Paraphrase: This is useful when you want to avoid plagiarism *Reframe: Change the perspective or focus of the rewrite. *Summarize: When you want a quick overview of a lengthy topic. *Expand: For a more comprehensive understanding of a topic. *Explain: Make the meaning of something clearer in the rewrite. *Reinterpret: Provide a possible meaning or understanding. *Simplify: Reduce the complexity of the language.

@evaletolab
evaletolab / karibou.openai.md
Last active December 4, 2025 13:02
usual prompts
//
// get list of accounting app build with TS (books,openexchangerates, bigcapital)
// https://github.com/topics/accounting?l=typescript
// https://www.npmjs.com/package/ratelimiter
export interface Transaction {
id?: string;
type?: 'payment' | 'loan' | 'memo';
direction?: 'input' | 'output';
memberId?: string;
memberFullName?: string;
//
// ensure that recorded mp3 contains audio
// - https://stackoverflow.com/questions/71103807/detect-silence-in-audio-recording
async detectSound(content) {
const MIN_DECIBELS = -45;
const audioCtx:AudioContext = new(window.AudioContext || (<any>window).webkitAudioContext)();
const blobUrl = (content.blob)?URL.createObjectURL(content.blob):content.url;
const audio = new Audio();
audio.playbackRate=2;
require('dotenv').config();
const { Configuration, OpenAIApi } = require("openai");
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);
const response = await openai.createEmbedding({
model: "text-embedding-ada-002",
input: "The food was delicious and the waiter...",
});

Ex1. Ma petite banque

On va créer une petite banque super basique avec le service juridique, la sécurité, et un accès universel, c'est moins de 30 lignes (de texte) pondues sur la table de la cuisine.

contract Bank {
  mapping (address => uint32) private account;

 constructor() {
//
// objectif
// trouver robin dans le premier million des décimales de PI
// --> https://www.pi2e.ch/blog/wp-content/uploads/2017/03/pi_hex_1m.txt
// 1. Il faut convertir un texte en base 16, exadécimal (0xff)
// La table de caractères en ASCII commence à la position 32 et se termine à la position 127 (0x7f)
// https://miro.medium.com/max/1400/1*CE8uSnYm4T-bhEFbUiGYVQ.png
function stringToHex(text) {
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
interface ERC20 {
function balanceOf(address account) external returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
}
// Adventure Awaits: find all 4 clues, solve the puzzle and claim the reward
@evaletolab
evaletolab / auth.sol
Last active August 9, 2021 11:23
playing with authentification and Solidity
pragma solidity ^0.6.0;
// SPDX-License-Identifier: MIT
contract AuthOracle {
}
// hash
// https://solidity-by-example.org/hashing/

  • ribbon title : 100% natural
<div class="right">
  <div class="ribbon top-left" title="100% natural"></div>
    <div class="left">
      <img src="https://ucarecdn.com/d955f08d-1a15-4d60-99e3-49d743264f68/-/scale_crop/500x500/center/coffret-glamourous.jpg" />