Full Code of swapagarwal/geeksay for AI

master 0ff761661d8d cached
15 files
41.3 KB
13.9k tokens
10 symbols
1 requests
Download .txt
Repository: swapagarwal/geeksay
Branch: master
Commit: 0ff761661d8d
Files: 15
Total size: 41.3 KB

Directory structure:
gitextract_8nvy437p/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── config.yml
│   │   └── feature-track.md
│   ├── pull_request_template.md
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .percy.yml
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── cli.js
├── geeksay.js
├── index.html
├── package.json
└── test/
    └── geeksay.test.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true


================================================
FILE: .github/ISSUE_TEMPLATE/feature-track.md
================================================
---
name: Feature (Hacktoberfest Track)
about: Propose work within a Hacktoberfest 2025 track
labels: hacktoberfest
---

### Track

(e.g., Browser Extension)

### Problem / Motivation

### Proposed Scope (for the first PR)

- [ ] ...

### Acceptance Criteria

- [ ] Tests (if relevant)
- [ ] Docs / README update
- [ ] Screenshots (UI work)


================================================
FILE: .github/pull_request_template.md
================================================
## Summary

What does this change do?

## Track

(e.g., track: playground)

## Screenshots / Demo (if UI)

## Checklist

- [ ] Linked issue
- [ ] Tests added/updated (if relevant)
- [ ] `npm run lint` passes
- [ ] Docs updated


================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
  pull_request:
  push:
    branches: [master]
jobs:
  build-and-test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18.x, 20.x]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"
      - run: npm ci
      - run: npm run lint --if-present
      - run: npm test --if-present


================================================
FILE: .gitignore
================================================
node_modules/

## IDEs

# Intelli J
.idea/
*.iml

# VS Code
.code/


================================================
FILE: .percy.yml
================================================
static-snapshots:
  snapshot-files: 'index.html'


================================================
FILE: .travis.yml
================================================
language: node_js
node_js:
- 'lts/*'
script:
- npm test
- npx percy snapshot


================================================
FILE: CONTRIBUTING.md
================================================
## Contributing

The core of this project is the [geeksay.js](https://github.com/swapagarwal/geeksay/blob/master/geeksay.js) file. Contributions are welcome! 😇

> If you'd like to quickly send some geeky words (e.g. home -> 127.0.0.1) without using GitHub, you can submit them via this [form](https://goo.gl/forms/LcJkSgghhm68Ajvc2) or in this [sheet](https://docs.google.com/spreadsheets/d/166ExyRTa6PmtRfONKsaICiaUDTLgATCVQ0K5fMtJuW8/edit?usp=sharing).

- For a small change, just send a PR.
- For bigger changes, open an issue for discussion before sending a PR.
- PR should include an example, if it makes sense.
- You can also contribute by:
  - Reporting issues
  - Suggesting new features or enhancements
  - Improving documentation
  

- Make sure not to format html files using prettier. It will break the format.
- Also, make sure to format javascript files using prettier.  

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2022 Swapnil Agarwal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# geeksay

[![Build Status](https://travis-ci.org/swapagarwal/geeksay.svg?branch=master)](https://travis-ci.org/swapagarwal/geeksay)
[![npm version](https://img.shields.io/npm/v/geeksay)](https://www.npmjs.com/package/geeksay)
[![npm downloads](https://img.shields.io/npm/dm/geeksay)](https://www.npmjs.com/package/geeksay)
[![npm bundle size](https://img.shields.io/bundlephobia/min/geeksay)](https://www.npmjs.com/package/geeksay)
[![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/swap/geeksay)
[![open issues](https://img.shields.io/github/issues/swapagarwal/geeksay.svg)](https://github.com/swapagarwal/geeksay/issues?q=is%3Aopen+is%3Aissue)
[![closed pull requests](https://img.shields.io/github/issues-pr-closed/swapagarwal/geeksay.svg)](https://github.com/swapagarwal/geeksay/pulls?q=is%3Apr+is%3Aclosed)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/swapagarwal/geeksay/fork)

> geeks will ctrl+s the world
> There's no place like 127.0.0.1
> sometimes, i just need a `<br>`

**geeksay** is a website and CLI to find geeky, cheesy phrases to send to your **Loved Ones** (or teammates 😉).

You know how sometimes you find these really geeky quotes and wish the world had more of them? geeksay fixes that.
Try it out at [http://geeksay.xyz](http://geeksay.xyz)

🤓 Featured on [npm weekly](https://medium.com/npm-inc/npm-weekly-221-npm-6-12-1-is-here-oss-sustainability-open-rfc-calls-more-eb6506c83311) 🤓

---

## 🎃 Hacktoberfest 2025

We’re participating again — and this year we’re inviting **extraordinary contributions**, not just typo fixes!

👉 Check out the umbrella issue: **[#Hacktoberfest 2025 — Pick a Track](../../issues/XXX)**

### Contribution Tracks

* **Browser Extension** (Chrome/Firefox/Edge)
* **Playground UI + Share Cards**
* **Quote/Translation Submission System**
* **Quiz / Games**
* **Accessibility + i18n**
* **TypeScript Core + Tests**
* **Geek Ipsum Generator**

### PR Guidelines

* One **substantive** PR per contributor per day.
* Group related changes together.
* Include tests where relevant.
* For UI work: screenshots/screen recordings required.
* Run `npm run lint` before pushing.

---

## Install

```bash
npm install -g geeksay
```

## Usage

### Module

```js
const geeksay = require('geeksay');
console.log(geeksay(`go hard or go home`));
// go hard || go 127.0.0.1
console.log(geeksay(`please make me a sandwich`));
// sudo make me a sandwich
```

### CLI

```bash
# install locally or globally
npm install geeksay

geeksay copy that
# ctrl+c that

geeksay to be or not to be, that is the question
# to be || ! to be, that is the question
```

> Note: **Do not** put quotes around the phrase, even if it contains spaces!

### npx

```bash
npx geeksay i was 5 and he was 6
# i was 101 && he was 110

npx geeksay sometimes i just need a break
# sometimes i just need a <br>
```

---

## Test

```bash
npm test
```

---

## Contributing

We ❤️ contributions! See the **[Hacktoberfest 2025 Umbrella Issue](../../issues/XXX)** to claim a track.
For general guidelines, read **[CONTRIBUTING.md](./CONTRIBUTING.md)**.


================================================
FILE: cli.js
================================================
#!/usr/bin/env node

const geeksay = require("./geeksay");

const [,, ...words] = process.argv;

const translation =  geeksay(words)

console.log(translation);


================================================
FILE: geeksay.js
================================================
const translations = {
  hide: "incognito",
  hidden: "incognito",
  screenshot: "start+prt sc",
  input: "<input>",
  into: "*",
  emotion: "emoticon",
  repeat: "loop",
  style: "css",
  save: "ctrl+s",
  break: "<br>",
  control: "ctrl",
  rule: "ctrl",
  escape: "esc",
  black: "#000",
  white: "#fff",
  bang: "!",
  not: "!",
  new: "ctrl+n",
  open: "ctrl+o",
  anchor: "<a>",
  bold: "<b>",
  cut: "ctrl+x",
  copy: "ctrl+c",
  paste: "ctrl+v",
  quit: "ctrl+q",
  close: "ctrl+w",
  help: "f1",
  rename: "f2",
  undo: "ctrl+z",
  redo: "ctrl+y",
  search: "ctrl+f",
  find: "ctrl+f",
  replace: "ctrl+r",
  print: "ctrl+p",
  greet: "ping",
  get: "git",
  got: "git",
  home: "127.0.0.1",
  bed: "127.0.0.1",
  house: "127.0.0.1",
  local: "127.0.0.1",
  localhost: "127.0.0.1",
  fuck: "fork",
  hello: "ping",
  hi: "ping",
  hey: "ping",
  command: "cmd",
  forget: "ctrl+z",
  world: "0.0.0.0/0",
  want: "require",
  need: "require",
  name: "alias",
  address: "url",
  pie: "π",
  function: "fn",
  kill: "alt+f4",
  stop: "abort",
  refresh: "f5",
  slow: "O(n^n)",
  fast: "O(1)",
  leet: "1337",
  hacker: "haxor",
  geek: "g33k",
  plus: "+",
  minus: "-",
  and: "&&",
  or: "||",
  binary: "01",
  call: "ping",
  me: "self",
  owner: "admin",
  god: "root",
  please: "sudo",
  at: "@",
  fix: "debug",
  shit: "dump",
  bullshit: "dump",
  poop: "dump",
  delete: "del",
  force: "ma",
  coffee: "covfefe",
  number: "#",
  image: "img",
  photo: "img",
  pic: "img",
  picture: "img",
  snap: "img",
  snapshot: "img",
  bye: "exit",
  noob: "n00b",
  life: "42",
  universe: "42",
  everything: "42",
  lifetime: "runtime",
  sleep: "shutdown",
  red: "#ff0000",
  green: "#00ff00",
  blue: "#0000ff",
  marry: "merge",
  propose: "commit",
  notfound: "404!",
  link: "url",
  send: "push",
  alternate: "alt",
  alternative: "alt",
  inspect: "ctrl+shift+i",
  equal: "=",
  remove: "rm",
  move: "mv",
  random: "rand",
  mathematics: "math",
  love: "<3",
  smile: ":)",
  sad: ":(",
  list: "ls",
  ok: "200",
  okay: "200",
  question: "?",
  history: "log",
  on: "1",
  off: "0",
  pixel: "px",
  say: "log",
  body: "<body>",
  head: "<head>",
  title: "<title>",
  restart: "ctrl+alt+del",
  death: "BSOD",
  wait: "load",
  waiting: "loading",
  unauthorized: "401",
  nothing: "void",
  all: "*",
  lineartime: "o(N)",
  change: "alt",
  pink: "#ffc0cb",
  developer: "dev",
  switch: "alt+tab",
  information: "info",
  space: "' '",
  full: "overload",
  modulo: "%",
  mind: "database",
  heart: "SMPS",
  semicolon: ";",
  future: "ctrl+y",
  past: "ctrl+z",
  missing: "404!",
  unavailable: "503!",
  overloaded: "502!",
  forbidden: "403!",
  timeout: "408!",
  repository: "repo",
  disapperar: "heisenbug",
  clueless: "Jimmy",
  imaginary: "Unicorny",
  catastrophic: "hidenbug",
  useless: "reality 101 faliure",
  different: "nested",
  calling: "recursion",
  heartbeat: "ping",
  boobs: "80085",
  error: "404",
  top: "</head>",
  "not found": "404",
  run: "ctrl+F5",
  comment: "//comment",
  table: "<table>",
  gray: "#ccc",
  grey: "#ccc",
  correct: "legit",
  teapot: "418",
  moved: "301",
  bad: "400",
  gone: "410",
  form: "<form>",
  select: "<select>",
  leave: "alt+f4",
  mistake: "ERROR",
  divide: "/",
  happy: ":)",
};

const translationsMap = new Map(Object.entries(translations));

const quotes = [
  "Everything is under control", // Everything is under ctrl
  "Give me a break", // Give me a <br>
  "Hello World", // ping 0.0.0.0/0
  "Bye World", // exit 0.0.0.0/0
  "Forget that ever happened", // ctrl+z that ever happened
  "Home is where the heart is", // 127.0.0.1 is where the SMPS is
  "Home is where ideas come to life", // 127.0.0.1 is where ideas come to 42
  "Home is where the wifi connects automatically", // 127.0.0.1 is where the wifi connects automatically
  "fuck that shit", // fork that dump
  "go hard or go home", // go hard || go 127.0.0.1
  "I will call you", // I will ping you
  "I want the world to know me", // I require the 0.0.0.0/0 to know self
  "I am the owner", // I am the admin
  "I am God", // I am root
  "please make me a sandwich", // sudo make self a sandwich
  "coffee is life", // covfefe is 42
  "what's your name", // what's your alias
  "I will find you and I will fix you!", // I will ctrl+f you && I will debug you!
  "I need help", // I require f1
  "geek alert", // g33k alert
  "geek inside", // g33k inside
  "copy that!", // ctrl+c that!
  "get out of home", // git out of 127.0.0.1
  "not everything is black and white", // ! 42 is #000 && #fff
  "to be or not to be, that is the question", // to be || ! to be, that is the ?
  "i was 5 and he was 6", // i was 101 && he was 110
  "he wore black and i wore white", // he wore #000 && i wore #fff
  "bang bang my baby shot me down", // ! ! my baby shot self down
  "Today is the first day of the rest of your lifetime", // Today is the first day of the rest of your runtime
  "i need to sleep", // i require to shutdown
  "There are ten types of people in the world: those who understand binary and those who don't", // There are ten types of people in the world: those who understand 01 && those who don't
  "I love my life", // I <3 my 42
  "I love my house", // I <3 my 127.0.0.1
  "heart break", // SMPS <br>
  "I like to fix shit", // I like to debug dump
  "eat sleep code repeat", // eat shutdown code repeat
  "roses are red, violets are blue", // roses are ##ff0000, violets are ##0000ff
  "The greatest trick the devil ever pulled was convincing the world he didn't exist", // The greatest trick the devil ever pulled was convincing the 0.0.0.0/0 he didn't exist
  "home sweet home", // 127.0.0.1 sweet 127.0.0.1
  "history repeats itself", // log repeats itself
  "My dog likes to greet me at the door.", // My dog likes to ping me at the door.
  "keep calm and geek on", // keep calm && g33k 1
  "somebody save me", // somebody ctrl+s me
  "Easy as pie", // easy as π
  "Live, laugh, love", // live, laugh, <3
  "Green with envy", // #00ff00 with envy
  "There's no place like home", //There's no place like 127.0.0.1
  "Green with envy", // #00ff00 with envy
  "Once in a blue moon", //Once in a #0000ff moon
  "Hello All", // Hello *
  "It is lineartime", // It is o(N)
  "you yourself are the anchor of your life", //you yourself are the <a> of your life
  "you are the love of my life", //you are the <3 of my 42
  "pink panther", //  #ffc0cb panther
  "Get busy living or get busy dying", // git busy living || git busy dying
  "out of the blue", // out of the #0000ff
  "caught red-handed", // caught #ff0000 handed
  "I love you", //I <3 you
  "He has a style", //He has a css
  "hide it!", //incognito it!
  "99 little bugs in the code. 99 little bugs in the code. Take one down, patch it around. 127 little bugs in the code", //cb - so many bugs
  "Hey Google! Find me the best repo.", //ping Google! ctrl+f self the best repo
  "I need to restart my life", // I require to ctrl+alt+del my 42
  "Paste my Code", // ctrl+v my Code
  "Paste my Copy", // ctrl+v my ctrl+c
  "What's new?", // What's ctrl+n
  "You're done coding! Go to sleep.", // You're done coding! Go to shutdown
  "Life is a big question that even Google can't find answer.", //42 is a big ? that even Google can't ctrl+f answer
  "Have no friends not equal to yourself.", // Have no friends ! = to yourself
  "The past does not equal the future.", //The past does ! = the future
  "I just switch tabs, not the love ones", // I just alt+tab tabs, not the <3 ones
  "I have not failed. I’ve just found 10,000 ways that won’t work", // I have ! failed. I’ve just found 0 ways that won’t work
  "Life is a big question that even Google can't find answer.", //42 is a big ? that even Google can't ctrl+f answer
  "Have no friends not equal to yourself.", // Have no friends ! = to yourself
  "The past does not equal the future.", //The past does ! = the future
  "I just switch tabs, not the love ones", // I just alt+tab tabs, not the <3 ones
  "to be or not to be", // 2b || !2b
  "programming joke", // My </code>
  "home sweet home", // 127.0.0.1 sweet 127.0.0.1
  "politics is bullshit", //politics is dump
  "I want the address of my love", // I want the url of my <3
  "Never get to bed mad, stay up and snap", // Never git to 127.0.0.1 mad,stay up && img
  "Heart is missing", //SMPS is 404!
  "Information is lost from the deleted repository", //Info is lost from the del repo
  "Be different", // Be !=
  "Don't leave blank space in your code!", // Don't alt+f4 blank ' ' in your code!
  "Sometimes it's okay to run", // Sometimes it's okay to ctrl+F5
  "Divide and conquer", // / and conquer
  "It's nice to find love, propose, send gifts, marry and live happy life", // It's nice to ctrl+f <3, commit, push gifts, merge && live :) 42
  "Thou shall not pass", // Thou shall ! pass
];

function isNumeric(num) {
  return !isNaN(parseInt(num));
}

function geeksay(text) {
  const input = Array.isArray(text) ? text : String(text).split(" ");
  return input.map(geeksayPhrase).join(" ");
}

function geeksayPhrase(word, index, words) {
  const currentWord = removeSymbols(word).toLowerCase();
  if (!words[index + 1]) return geeksayWord(currentWord);
  const nextWord = removeSymbols(words[index + 1]).toLowerCase();
  const translatedPhrase = translationsMap.get(currentWord + " " + nextWord);
  if (translatedPhrase) {
    words.splice(index, 1);
    return translatedPhrase;
  }
  return geeksayWord(currentWord);
}

function containsSpecialChars(str) {
  const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~a-zA-Z]/;
  return specialChars.test(str);
}

function geeksayWord(word) {
  // skipping this geekification if the word was already geekified
  if ([...translationsMap.values()].includes(word)) return word;
  return isNumeric(word) ? handleNumeric(word) : handleText(word);
}

function handleNumeric(word) {
  for (var i = 0; i < word.length; i++) {
    if (containsSpecialChars(word)) {
      return word.toString(2);
    } else {
      return (word >>> 0).toString(2);
    }
  }
}

function handleText(word) {
  return (
    translationsMap.get(removeSymbols(word).toLowerCase()) || word.toLowerCase()
  );
}

function removeSymbols(word) {
  return word.replace(/(?!\n|\r\n)[^a-zA-Z0-9 ]+/, "");
}

function getRandomTranslation() {
  const keys = Object.keys(translations);
  const randomKey = keys[Math.floor(Math.random() * keys.length)];
  return "Random Translation: " + randomKey + " -> " + translations[randomKey];
}

function getRandomQuote() {
  return quotes[Math.floor(Math.random() * quotes.length)];
}

module.exports = geeksay;


================================================
FILE: index.html
================================================
<!DOCTYPE html>
<html lang="en">

<head>
  <title>geeksay</title>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <link rel="icon" type="image/png" href="logo.png" />
  <link rel="apple-touch-icon" sizes="128x128" href="logo.png" />
  <link href="https://fonts.googleapis.com/css?family=Lato:300,400" rel="stylesheet" type="text/css" />
  <script src="geeksay.js"></script>
  <script defer src="https://kit.fontawesome.com/a85c3c542a.js" crossorigin="anonymous"></script>
</head>
<style>
  @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap");
  @import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap");
  @import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');

  * {
    margin: 0;
    padding: 0;
  }

  body {
    height: 100%;
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    background-color: #111111;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 1500'%3E%3Cdefs%3E%3Crect stroke='%23111111' stroke-width='.5' width='1' height='1' id='s'/%3E%3Cpattern id='a' width='3' height='3' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cuse fill='%23161616' href='%23s' y='2'/%3E%3Cuse fill='%23161616' href='%23s' x='1' y='2'/%3E%3Cuse fill='%231b1b1b' href='%23s' x='2' y='2'/%3E%3Cuse fill='%231b1b1b' href='%23s'/%3E%3Cuse fill='%231f1f1f' href='%23s' x='2'/%3E%3Cuse fill='%231f1f1f' href='%23s' x='1' y='1'/%3E%3C/pattern%3E%3Cpattern id='b' width='7' height='11' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cg fill='%23242424'%3E%3Cuse href='%23s'/%3E%3Cuse href='%23s' y='5' /%3E%3Cuse href='%23s' x='1' y='10'/%3E%3Cuse href='%23s' x='2' y='1'/%3E%3Cuse href='%23s' x='2' y='4'/%3E%3Cuse href='%23s' x='3' y='8'/%3E%3Cuse href='%23s' x='4' y='3'/%3E%3Cuse href='%23s' x='4' y='7'/%3E%3Cuse href='%23s' x='5' y='2'/%3E%3Cuse href='%23s' x='5' y='6'/%3E%3Cuse href='%23s' x='6' y='9'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='h' width='5' height='13' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cg fill='%23242424'%3E%3Cuse href='%23s' y='5'/%3E%3Cuse href='%23s' y='8'/%3E%3Cuse href='%23s' x='1' y='1'/%3E%3Cuse href='%23s' x='1' y='9'/%3E%3Cuse href='%23s' x='1' y='12'/%3E%3Cuse href='%23s' x='2'/%3E%3Cuse href='%23s' x='2' y='4'/%3E%3Cuse href='%23s' x='3' y='2'/%3E%3Cuse href='%23s' x='3' y='6'/%3E%3Cuse href='%23s' x='3' y='11'/%3E%3Cuse href='%23s' x='4' y='3'/%3E%3Cuse href='%23s' x='4' y='7'/%3E%3Cuse href='%23s' x='4' y='10'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='c' width='17' height='13' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cg fill='%23292929'%3E%3Cuse href='%23s' y='11'/%3E%3Cuse href='%23s' x='2' y='9'/%3E%3Cuse href='%23s' x='5' y='12'/%3E%3Cuse href='%23s' x='9' y='4'/%3E%3Cuse href='%23s' x='12' y='1'/%3E%3Cuse href='%23s' x='16' y='6'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='d' width='19' height='17' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cg fill='%23111111'%3E%3Cuse href='%23s' y='9'/%3E%3Cuse href='%23s' x='16' y='5'/%3E%3Cuse href='%23s' x='14' y='2'/%3E%3Cuse href='%23s' x='11' y='11'/%3E%3Cuse href='%23s' x='6' y='14'/%3E%3C/g%3E%3Cg fill='%232e2e2e'%3E%3Cuse href='%23s' x='3' y='13'/%3E%3Cuse href='%23s' x='9' y='7'/%3E%3Cuse href='%23s' x='13' y='10'/%3E%3Cuse href='%23s' x='15' y='4'/%3E%3Cuse href='%23s' x='18' y='1'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='e' width='47' height='53' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cg fill='%234f53ff'%3E%3Cuse href='%23s' x='2' y='5'/%3E%3Cuse href='%23s' x='16' y='38'/%3E%3Cuse href='%23s' x='46' y='42'/%3E%3Cuse href='%23s' x='29' y='20'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='f' width='59' height='71' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cg fill='%234f53ff'%3E%3Cuse href='%23s' x='33' y='13'/%3E%3Cuse href='%23s' x='27' y='54'/%3E%3Cuse href='%23s' x='55' y='55'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='g' width='139' height='97' patternUnits='userSpaceOnUse' patternTransform='scale(50) translate(-980 -735)'%3E%3Cg fill='%234f53ff'%3E%3Cuse href='%23s' x='11' y='8'/%3E%3Cuse href='%23s' x='51' y='13'/%3E%3Cuse href='%23s' x='17' y='73'/%3E%3Cuse href='%23s' x='99' y='57'/%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23a)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23b)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23h)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23c)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23d)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23e)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23f)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23g)' width='100%25' height='100%25'/%3E%3C/svg%3E");
    background-attachment: fixed;
    background-size: cover;
    color: #fff;
    padding: 50px;
    overflow-x: hidden;
    font-size: 18px;
  }

  .container {
    max-width: 600px;
    margin: 0 auto;
    z-index: 10;
  }

  @media (max-width: 570px) {
    body {
      padding: 20px;
    }

    textarea{
      margin: 0vh -2vh;
      width: 100% !important;
    }
  }

  h1 {
    font-family: 'Ubuntu',sans-serif;
    font-weight: 300;
    margin-bottom: 0;
  }

  textarea {
    width: 100%;
    font-family: 'Ubuntu',Arial,sans-serif;
    font-weight: 400;
    font-size: 18px;
    background: #eee;
    height: 150px;
    line-height: 24px;
    resize: none;
    padding: 15px;
    border-radius: 5px;
    box-sizing: border-box;
    margin: auto;
    box-shadow: inset 0 0 10px #2c2c2c;

  }

  textarea:focus {
    outline: none;
  }

  select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block;
    border: 0;
    outline: 0;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1.5;
    background-color: #eee;
    border-radius: 3px;
    margin: 0 4px 4px 4px;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
      0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
  }

  select:focus {
    background-color: #7bd6cf;
  }

  button {
    background: #4f53ff;
    border: none;
    border-radius: 10px;
    font-family: "Lato", "Helvetica", Arial, sans-serif;
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    outline: 0;
    transition: all 0.25s ease;
    position: relative;
    height: 35px;
    padding: 0px 12px;
    box-shadow: 5px 5px rgba(255, 255, 255, 0.2),
      10px 10px rgba(255, 255, 255, 0.1), 15px 15px rgba(255, 255, 255, 0.05);
  }

  button:hover {
    background: #2196f3;
    transform: translate3d(0,-4px,0);
  }

  #footer {
    margin-top: 100px;
    padding-top: 20px;
    border-top: 2px solid #4f53ff;
    text-align: center;
    text-transform: uppercase;
  }

  #footer>p {
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.1em;
    padding-right: 6px;
  }

  .red{
    color: red;
  }

  .note {
    font-size: 12px;
  }

  #layman-heading{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  #layman-heading .heading{
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
  }

  a:link,
  a:visited {
    color: rgb(53, 171, 250);
    text-decoration: none;
  }

  a:hover {
    color: #2196f3;
  }

  #randomTranslationButton {
    margin: 30px;
    margin-top: 30px !important;
    width: 140px;
  }

  /* Hide this somewhere */
  #clipboardContents {
    opacity: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 0;
  }

  #output {
    display: inline-block;    
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    background-color: #151718;
    color: #2196f3;
    border: 1px solid #000;
    border-radius: 5px;
    font-weight: 500;
    overflow: auto;
    min-height: 115px;
    font-family: "Source Code Pro", monospace;
    box-shadow: 5px 5px rgba(255, 255, 255, 0.2),
      10px 10px rgba(255, 255, 255, 0.1), 15px 15px rgba(255, 255, 255, 0.05);
  }

  ::-webkit-scrollbar {
    background: #555;
    width: 8px;
    height: 8px;
  }

  ::-webkit-scrollbar-thumb {
    background: #4f53ff;
    border-radius: 4px;
  }

  ::-webkit-scrollbar-corner {
  background: none;
}

::-webkit-scrollbar-track {
  opacity: 0;
}

  .tweet-btn {
    margin-top: 3px;
    /* background-color: #1d9bf0; */
    background-color: #3b9cdd;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    min-width: 140px;
  }

  .tweet-btn i{
    color: #fff;
    font-size: 17px;
    padding-top: 3px;
  }

  .tweet-btn:hover {
    background-color: #0f76bb;
  }

  .fb-btn {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .fb-btn i{
    font-size: 15px;

  }

  .random-quote-button {
    float: right;
  }

  #randomQuoteButton {
    width: 140px;
  }

  .copy-btn{
    width: 140px;
  }
  
  .rt-btns {
    float: right;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #geek-buttons{
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  @media (max-width:460px) {
    #layman-heading{
      flex-direction: column !important;
      justify-content: space-between !important;
      align-items: flex-start !important;
    }
    #randomQuoteButton{
      margin-left: auto;
    }
    .social-btns .share-buttons{
      flex-direction: column !important;
      gap: 2rem !important;
    }
    textarea{
      width: 100% !important;
    }
    #geek-buttons{
      justify-content: space-between !important;
      align-items: flex-start !important;
      flex-direction: column !important;
      gap: 1rem !important;
    }
    .rt-btns{
      margin-left: auto !important;
    }
  }

  .social-btns{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
  }

  .social-btns .share-buttons{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
  }
</style>
<style>
  .github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
  }

  @keyframes octocat-wave {

    0%,
    100% {
      transform: rotate(0);
    }

    20%,
    60% {
      transform: rotate(-25deg);
    }

    40%,
    80% {
      transform: rotate(10deg);
    }  
  }

  @media (max-width: 570px) {
    .github-corner:hover .octo-arm {
      animation: none;
    }

    .github-corner .octo-arm {
      animation: octocat-wave 560ms ease-in-out;
    }
  }

  .animate-geeksay {
    
    background-image: linear-gradient( 285deg, #231557 0%, #2556ed 29%, #a90ddb 67%, #fff800 100% );
    background-size: auto auto;
    background-clip: border-box;
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textclip 2s linear infinite;
    display: inline-block;
    font-size: 35px;
    font-family: "Source Code Pro", monospace;
}

@keyframes textclip {
  to {
    background-position: 200% center;
  }
}

</style>

<body>
  <a href="https://github.com/swapagarwal/geeksay" class="github-corner" aria-label="View source on Github">
    <svg width="80" height="80" viewBox="0 0 250 250" style="
          fill: #eee;
          color: #000;
          position: absolute;
          top: 0;
          border: 0;
          right: 0;
        " aria-hidden="true">
      <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
      <path
        d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
        fill="currentColor" style="transform-origin: 130px 106px" class="octo-arm"></path>
      <path
        d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
        fill="currentColor" class="octo-body"></path>
    </svg>
  </a>
<br>
  <div class="container">
      <div class="row">
        <div align="left">
          <h3 class="animate-geeksay"> Geeksay</h3>
        </div>
    </div>
    <h1 id="layman-heading">
      <div class="heading">
        From layman 👶
        <p class="note">(just start typing!)</p>
      </div>
      <button class="random-quote-button" onclick="randomQuote()"
        id="randomQuoteButton">
        Random Quote
      </button>
    </h1>
    <br />
    <textarea id="input" aria-required="true">
geeks will save the world!
There's no place like home
sometimes, i just need a break</textarea>
    <br /><br />
    <h1 id="geek-buttons">
      To geek 🤓&nbsp;&nbsp;&nbsp;
      <div class="rt-btns">
        <button class="copy-btn random-quote-button" onclick="copyquote()" onmouseout="outFunc()">Copy 📄</button>
      </div>
    </h1>
    <br />
    <div style="line-height: 24px" id="output"></div>
    <br>
    <br>
    <div class="social-btns">
      <h1>Share 🐦</h1>
      <br>
      <div class="share-buttons">
        <button class="tweet-btn random-quote-button" onclick="postTweet()">
          <i class="fa-brands fa-twitter"></i>
          &emsp;Tweet
        </button>
        <button class="tweet-btn random-quote-button fb-btn share-popup" onclick="postFacebook()">
          <i class="fa-brands fa-facebook-f"></i>
          &emsp;Share
        </button>
      </div>
    </div>
    <div id="footer">
      <p style="padding-bottom: 15px">
        made with <span class="red">❤︎</span> by <a href="https://swapnil.net/" target="_blank">swapnil</a> | designed
        by <a href="https://twitter.com/notwaldorf" target="_blank">monica</a> | maintained by <a
          href="https://github.com/dk3775" target="_blank">dhyey</a></p>
      </p>
    </div>
    <br />
    <div align="center">
      <a id="help" href="https://github.com/swapagarwal/geeksay/issues/6" target="_blank">Need an API?</a>
    </div>
    <div align="center">
      <p style="display: inline-block" id="randomTranslation"></p>
      <br />
      <button style="margin-top: 0px" onclick="randomTranslation()" id="randomTranslationButton">
        One more!
      </button>
    </div>
  </div>
  <!-- Gigantor hack to get the copy-to-clipboard working. I don't think it
        works with hidden divs, so uhhhh just hide this one real well -->
  <div id="clipboardContents"></div>
  <script type="text/javascript">
    console.log(geeksay("geeks will save the world"));
    document.getElementById("randomTranslation").innerText =
      getRandomTranslation();
  </script>
  <script>
    const copyText = document.querySelector(".copy-btn")
    updateOutput();
    document.getElementById("input").addEventListener("input", function () {
      updateOutput();
    });
    function updateOutput() {
      // Rather than calling geekify, we want all the
      // possible options.
      document.getElementById("output").innerHTML = "";
      var inputField = document.getElementById("input");
      var text = inputField.value.trim();
      if (text.length !== 0) {
        var container = document.getElementById("output");
        var allLines = text.split("\n");
        for (const line in allLines) {
          if (allLines[line] == "") continue;
          var words = allLines[line].split(" ");
          var node = document.createElement("span");
          node.innerText = geeksay(words) + " ";
          if (node) container.appendChild(node);
          var newLine = document.createElement("br");
          container.appendChild(newLine);
        }
        return container;
      } else {
        document.getElementById("output").innerHTML =
          "Type something in the above area...";
      }
    }
    function copy() {
      var value = getActualOutput();
      clipboardContents.textContent = value;
      // From https://github.com/google/material-design-lite/blob/master/docs/_assets/snippets.js
      var snipRange = document.createRange();
      snipRange.selectNodeContents(clipboardContents);
      var selection = window.getSelection();
      selection.removeAllRanges();
      selection.addRange(snipRange);
      var result = false;
      try {
        result = document.execCommand("copy");
        copyButton.innerHTML = "Done!";
      } catch (err) {
        // Copy command is not available
        console.error(err);
        copyButton.innerHTML = "Oops, error copying :(";
      }
      // Return to the copy button after a second.
      setTimeout(
        function () {
          copyButton.innerHTML = "Copy to clipboard";
        }.bind(this),
        1000
      );
      selection.removeAllRanges();
      return result;
    }
    function postTweet() {
      const url = 'https://twitter.com/intent/tweet?hashtags=geeksay&text=';
      const unformattedText = document.getElementById('output').innerText;
      const words = unformattedText.split('\n');
      for (const word in words) {
        words[word] = words[word].replace(/ /g, '%20');
        words[word] = words[word].replace(/#/g, '%23');
        words[word] += '%0A';
      }
      window.open(url + words.join(''));
    }
    function postFacebook() {
      const url = 'https://www.facebook.com/sharer/sharer.php?u=https://www.geeksay.xyz';
      window.open(url);
    }
    function getActualOutput() {
      var value = "";
      var nodes = output.children;
      for (var i = 0; i < nodes.length; i++) {
        if (nodes[i].tagName === "SELECT") {
          // Do this instead of .value because we want to maintain whitespace.
          value += nodes[i].options[nodes[i].selectedIndex].textContent;
        } else if (nodes[i].tagName === "BR") {
          value += "\n";
        } else if (nodes[i].tagName != "OPTION") {
          value += nodes[i].textContent;
        }
      }
      return value;
    }
    function randomTranslation() {
      document.getElementById("randomTranslation").innerText =
        getRandomTranslation();
    }
    function randomQuote() {
      document.getElementById("input").value = getRandomQuote();
      updateOutput();
    }
    function copyquote() {
      var copyText = document.getElementById("output").textContent;
      navigator.clipboard.writeText(copyText);

      var copyBtn = document.getElementsByClassName("copy-btn");
      copyBtn[0].innerHTML = "Copied ✔️";
    }
    function outFunc() {
      var copyBtn = document.getElementsByClassName("copy-btn");
      copyBtn[0].innerHTML = "Copy 📄";
    }
  </script>
</body>

</html>


================================================
FILE: package.json
================================================
{
  "name": "geeksay",
  "version": "1.2.1",
  "description": "🤓 geeks will ctrl+s the world!",
  "main": "geeksay.js",
  "bin": {
    "geeksay": "./cli.js"
  },
  "scripts": {
    "test": "node_modules/.bin/mocha test/*"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/swapagarwal/geeksay.git"
  },
  "keywords": [
    "translate",
    "layman",
    "geek",
    "api"
  ],
  "author": "Swapnil Agarwal <hi+npm@swapnil.net> (http://swapnil.net)",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/swapagarwal/geeksay/issues"
  },
  "homepage": "https://github.com/swapagarwal/geeksay#readme",
  "devDependencies": {
    "mocha": "^11.7.3",
    "percy": "^5.0.0",
    "should": "^13.2.3"
  },
  "dependencies": {
    "esprima": "^4.0.1",
    "npm-check-updates": "^19.0.0"
  }
}


================================================
FILE: test/geeksay.test.js
================================================
const should = require("should");
const esprima = require("esprima");
const fs = require("fs");
const geeksay = require("../geeksay");

describe("words", () => {
  it("love", () => {
    should.equal(geeksay("love"), "<3");
  });

   it("LOVE - case insensitive ", () => {
    should.equal(geeksay("LOVE"), "<3");
  });

  it("not", () => {
    should.equal(geeksay("not"), "!");
  });

  it("NOT - case insensitive", () => {
    should.equal(geeksay("NOT"), "!");
  });

  it("slow", () => {
    should.equal(geeksay("slow"), "O(n^n)");
  });

  it("SloW - case insensitive", () => {
    should.equal(geeksay("SloW"), "O(n^n)");
  });

  it("semicolon", () => {
    should.equal(geeksay("semicolon"), ";");
  });
});

describe("quotes", () => {
  it("Hello World", () => {
    should.equal(geeksay("Hello World"), "ping 0.0.0.0/0");
  });

  it("heLLo WorlD - case insensitive", () => {
    should.equal(geeksay("heLLo WorlD"), "ping 0.0.0.0/0");
  });

  it("I love my house", () => {
    should.equal(geeksay("I love my house"), "I <3 my 127.0.0.1");
  });

  it("I have not failed. I’ve just found 10,000 ways that won’t work", () => {
    should.equal(geeksay("I have not failed. I’ve just found 10,000 ways that won’t work"), "I have ! failed. I’ve just found 0 ways that won’t work");
  });
});

describe("multi-line and symbols", () => {
  it(`Every day after waking up \\n I say Hello World and \\n hi \\n to the world `, () => {
    should.equal(
      geeksay(`Every day after waking up
        I say Hello World and
        hi
        to the world `),
      `Every day after waking up
        I log ping 0.0.0.0/0 &&
        hi
        to the 0.0.0.0/0 `
    );
  });

  it("space", () => {
    should.equal(
      geeksay("I love my            house"),
      "I <3 my            127.0.0.1"
    );
  });

  it("symbols #1", () => {
    should.equal(geeksay("I love my @ house"), "I <3 my @ 127.0.0.1");
  });

  it("symbols #2", () => {
    should.equal(geeksay("(=> I love my house )"), "(=> I <3 my 127.0.0.1 )");
  });

  it("symbols #3", () => {
    should.equal(geeksay("I love my house!"), "I <3 my 127.0.0.1!");
  });

  it("symbols #4", () => {
    should.equal(
      geeksay("Roses are red, violets are blue."),
      "Roses are #ff0000, violets are #0000ff."
    );
  });
});

describe("html tags", () => {
  it("inside tag with space", () => {
    should.equal(
      geeksay('<a href="#"> Hello World </a>'),
      '<a href="#"> ping 0.0.0.0/0 </a>'
    );
  });

  // TODO:
  // it('inside tag without space', () => {
  // 	should.equal(geeksay('<a href="#">Hello World</a>'), '<a href="#">ping 0.0.0.0/0</a>');
  // });
});

describe("inputs", () => {
  it("input as array", () => {
    should.equal(geeksay(["hello", "my", "love"]), "ping my <3");
  });

  it("null", () => {
    should.equal(geeksay(null), "null");
  });

  it("undefined", () => {
    should.equal(geeksay(undefined), "undefined");
  });

  it("object", () => {
    should.equal(geeksay({ Hello: "World" }), "[object Object]");
  });

  it("array of numbers", () => {
    should.equal(geeksay([1, 2, 3, 4, "100"]), "1 10 11 100 1100100");
  });
});

describe("code checks", () => {
  it("duplicate translation entries", () => {
    const libfile = "../geeksay.js"; // Library file location
    const varname = "translations"; // Variable to check for duplicate entries

    var code = fs.readFileSync(__dirname + "/" + libfile, "utf8");
    var ast = esprima.parse(code);

    // Find 'translations' variable and extract entries' keys
    var duplicates;
    for (const i in ast.body) {
      let decl = ast.body[i];
      if (decl.type == "VariableDeclaration") {
        for (const j in decl.declarations) {
          if (decl.declarations[j].id.name == varname) {
            translations = decl.declarations[j];
            entries = translations.init.properties.map(
              (prop) => prop.key.value
            );
            duplicates = entries.filter(
              (item, index) => entries.indexOf(item) != index
            );
          }
        }
      }
    }

    // Case if 'translations' variable was not found and 'duplicates' is therefore undefined
    if (typeof duplicates == "undefined") {
      throw Error(
        "Variable '" +
          varname +
          "' was not found in library file (" +
          libfile +
          ")."
      );
    }

    // The number of duplicates should be 0
    should.equal(
      duplicates.length,
      0,
      "Found duplicate " +
        duplicates.length +
        " entries: " +
        duplicates.map((entry) => '"' + entry + '"').join(", ")
    );
  });
});
Download .txt
gitextract_8nvy437p/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── config.yml
│   │   └── feature-track.md
│   ├── pull_request_template.md
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .percy.yml
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── cli.js
├── geeksay.js
├── index.html
├── package.json
└── test/
    └── geeksay.test.js
Download .txt
SYMBOL INDEX (10 symbols across 1 files)

FILE: geeksay.js
  function isNumeric (line 280) | function isNumeric(num) {
  function geeksay (line 284) | function geeksay(text) {
  function geeksayPhrase (line 289) | function geeksayPhrase(word, index, words) {
  function containsSpecialChars (line 301) | function containsSpecialChars(str) {
  function geeksayWord (line 306) | function geeksayWord(word) {
  function handleNumeric (line 312) | function handleNumeric(word) {
  function handleText (line 322) | function handleText(word) {
  function removeSymbols (line 328) | function removeSymbols(word) {
  function getRandomTranslation (line 332) | function getRandomTranslation() {
  function getRandomQuote (line 338) | function getRandomQuote() {
Condensed preview — 15 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (46K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 27,
    "preview": "blank_issues_enabled: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature-track.md",
    "chars": 341,
    "preview": "---\nname: Feature (Hacktoberfest Track)\nabout: Propose work within a Hacktoberfest 2025 track\nlabels: hacktoberfest\n---\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 227,
    "preview": "## Summary\n\nWhat does this change do?\n\n## Track\n\n(e.g., track: playground)\n\n## Screenshots / Demo (if UI)\n\n## Checklist\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 437,
    "preview": "name: CI\non:\n  pull_request:\n  push:\n    branches: [master]\njobs:\n  build-and-test:\n    runs-on: ubuntu-latest\n    strat"
  },
  {
    "path": ".gitignore",
    "chars": 67,
    "preview": "node_modules/\n\n## IDEs\n\n# Intelli J\n.idea/\n*.iml\n\n# VS Code\n.code/\n"
  },
  {
    "path": ".percy.yml",
    "chars": 49,
    "preview": "static-snapshots:\n  snapshot-files: 'index.html'\n"
  },
  {
    "path": ".travis.yml",
    "chars": 77,
    "preview": "language: node_js\nnode_js:\n- 'lts/*'\nscript:\n- npm test\n- npx percy snapshot\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 885,
    "preview": "## Contributing\n\nThe core of this project is the [geeksay.js](https://github.com/swapagarwal/geeksay/blob/master/geeksay"
  },
  {
    "path": "LICENSE",
    "chars": 1072,
    "preview": "MIT License\n\nCopyright (c) 2022 Swapnil Agarwal\n\nPermission is hereby granted, free of charge, to any person obtaining a"
  },
  {
    "path": "README.md",
    "chars": 3209,
    "preview": "# geeksay\n\n[![Build Status](https://travis-ci.org/swapagarwal/geeksay.svg?branch=master)](https://travis-ci.org/swapagar"
  },
  {
    "path": "cli.js",
    "chars": 160,
    "preview": "#!/usr/bin/env node\n\nconst geeksay = require(\"./geeksay\");\n\nconst [,, ...words] = process.argv;\n\nconst translation =  ge"
  },
  {
    "path": "geeksay.js",
    "chars": 10640,
    "preview": "const translations = {\n  hide: \"incognito\",\n  hidden: \"incognito\",\n  screenshot: \"start+prt sc\",\n  input: \"<input>\",\n  i"
  },
  {
    "path": "index.html",
    "chars": 19642,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <title>geeksay</title>\n  <meta charset=\"UTF-8\">\n  <meta http-equiv=\"X-UA-Comp"
  },
  {
    "path": "package.json",
    "chars": 820,
    "preview": "{\n  \"name\": \"geeksay\",\n  \"version\": \"1.2.1\",\n  \"description\": \"🤓 geeks will ctrl+s the world!\",\n  \"main\": \"geeksay.js\",\n"
  },
  {
    "path": "test/geeksay.test.js",
    "chars": 4631,
    "preview": "const should = require(\"should\");\nconst esprima = require(\"esprima\");\nconst fs = require(\"fs\");\nconst geeksay = require("
  }
]

About this extraction

This page contains the full source code of the swapagarwal/geeksay GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 15 files (41.3 KB), approximately 13.9k tokens, and a symbol index with 10 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!