Skip to content

Instantly share code, notes, and snippets.

@asdqdsa
Last active January 27, 2025 11:06
Show Gist options
  • Save asdqdsa/798b3f55aa1a0c22eaba53e6a1d91fca to your computer and use it in GitHub Desktop.
Save asdqdsa/798b3f55aa1a0c22eaba53e6a1d91fca to your computer and use it in GitHub Desktop.

Revisions

  1. asdqdsa revised this gist Jan 27, 2025. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    #!/usr/bin/env node

    const fs = require("fs");
    const path = require("path");

  2. asdqdsa revised this gist Jan 27, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package.json
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    {
    "name": "lucky-charm",
    "name": "lucky-charm-2",
    "version": "2.0.2",
    "bin": "./index.js"
    }
  3. asdqdsa created this gist Jan 27, 2025.
    23 changes: 23 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    const fs = require("fs");
    const path = require("path");

    const flagFilePath = path.join(require("os").homedir(), ".lucky-charm-flag");

    if (!fs.existsSync(flagFilePath)) {
    console.log("WARNING: ur system is being monitored... jk lol 🫣");
    fs.writeFileSync(flagFilePath, "you’ve been here before");
    } else {
    console.log("welcome back to the luck buff program ✨");
    }

    const luckMessages = [
    "your luck has increased! ✨",
    "fortune smiles upon you today! 🍀",
    "you've unlocked a +1 luck buff! 🎲",
    "your luck just leveled up! 💫",
    "your luck is off the charts! 🌟",
    "luck buff: ✨ your luck has increased! +1"
    ];

    const randomMessage = luckMessages[Math.floor(Math.random() * luckMessages.length)];
    console.log("\x1b[35m%s\x1b[0m", randomMessage);
    5 changes: 5 additions & 0 deletions package.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    {
    "name": "lucky-charm",
    "version": "2.0.2",
    "bin": "./index.js"
    }