Skip to content

mattc41190/utilitiesforme

Repository files navigation

Utilities For Me

JavaScript Style Guide

What is this

This is a repository that contains the source code for the utilitiesfor.me application. See: https://utilitiesfor.me

demo

Why make this?

Your utility site is gross, and insecure, and full of ads and trackers ๐Ÿ˜ฟ.

How do I use this?

As a Developer?

  • Have Node and Python ๐Ÿ โž• ๐Ÿ…น๐Ÿ†‚
  • Start the Environment
# python3 -m venv .venv # Once!
source .venv/bin/activate
  • Install the Dependencies
pip install -r requirements.txt
npm install 
  • Add or Fix a Utility
# utilities_for_me/utilities/_echo/echo.py
def echo(_str):
    return _str
  • Wrap Utility in Endpoint(s)
# utilities_for_me/web_app/server.py
@app.route('/echo/echo', methods=['POST'])
def echo():
    from utilities_for_me.utilities._echo.echo import echo
    return echo(request.form.get("contents", ""))
  • Test it!
curl -X POST -F "contents=hello" http://localhost:5050/echo/echo
  • Publish Endpoint
make deploy

As a User?

Common Developer Make Targets

  • Build and Run Server
make run_dev_server
  • Run Client Bundler
# OLD
make run_dev_ui

# NEW -- Temp (Run each in own terminal... I know I am working on it!)
# JS Bundler
npm run scripts-watch

# CSS Bundler
npm run styleit

Ideas For Utils

  • Echo โœ…
  • Prettify โœ…
  • Date & Time Calculator ๐Ÿง—โ€โ™‚๏ธ
  • Number Calculator
  • Code Case Transformer โœ…
  • Random String Generator โœ…
  • Hex/Binary/Base10/Octal Converter
  • Fake Data Creator V-2
  • Data Encryption โœ…
  • Regex Tester V-N
  • Secret Santa Generator V-2
  • Data Structure Analyzer V-2
  • Priority Queue Simulator V-2
  • Image / Avatar Creator
  • Percent Calculator โœ…
  • Page Scraper V-N
  • Timer โœ…
  • GIF database V-2
  • Move to DO for all the things ๐Ÿง—

Ideas For App

  • Offer client only (where possible) so that user can disconnect from web and everything would still work ๐Ÿ”ฎ
  • Offer theme picker with local web storage backing it
  • Offer ability to "hash" state so that a user can share something like a secret santa generator

Conventions

  • URLs are kebab cased
  • Utilities are written FIRST and test first in the utilities directory

About

A collection of utilities that I find useful and maybe you will too! ๐Ÿ› 

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published