A lot of my coding in the past few years as fallen into the private repo category either due to it being for commercial use, or for personal/private use. As such my public github account has been pretty bare lately and I decided it was time to cull through the pile of private repos and publish a few that demonstrated something that might be useful for others. Here’s a few so far. I’ll publish more as I clean them up.
Crypto Wallet Search
- https://github.com/ksturner/crypto-wallet
- You can find a demo of it here as well: Crypto Wallet Search
This is one that I personally use. With crypto wallets, your wallet is really just a passcode to unlock balances on various blockchains. You might be under the impression that you can just open your wallet and instantly see what assets you have but in reality, all you would find is a key. To find out what assets you own, you’ve got to try that key on various chains to see what it unlocks.
That’s great for the dominant coins out there that are always at the forefront of your mind, but what about all the smaller tokens you might have acquired or traded and have completely forgotten about? This happens frequently when I setup Metamask on a new computer or browser and I have to manually add the tokens for the balances I want to see. Or, when it comes time for taxes, there is always the nagging question of whether I have balances out there that I’m unaware of. Sure, crypto tax software will track and record your transactions, but if you’ve got a balance that’s just sitting there, it would be an asset, but not register as a taxable event if you’ve just been holding it.
What Crypto Wallet Search does, is for any provided wallet address, it takes the top 50, 100, or 200 coins that are ERC20 (Ethereum) compatible and searches them in parallel to see if they have any balances. If any are found, they are displayed, along with a quick up-to-date value of the amounts in US Dollars.
This does not report whether you have ever owned, or had transactions in the past, just what the current balances are.
Check it out if you’re curious.
Swift OCR (Optical Character Recognition) CLI app
I had need of processing a batch of images through an OCR engine. There are a number of open source options out there, but after trying them, they could never really perform as well as the OCR available in the latest iOS. Yes, there are likely ways to bring the open source versions up to or excelling beyond others, but I did not have the time nor experience to do that.
It occurred to me that I should just write an iOS app and process my images from an iPhone. While I did write an iOS app to do this, the thought occurred that if I could port this to a macOS app, it would be very convenient. I did that, and then decided I could take it one step further and port it to a cli app.
This project is the result of that. It uses Swift Package Manager commands to build, versus an Xcode project, but I prefer that. This version in this github repo is very simple. There are a number of IO command line options you could add to make this more powerful but I’ll leave that for others.
ScriptRecall.com
This is a quick demo site for free text memorization. While it has a login/signup form, the backend is currently disconnected to prevent users from incurring extra hosting costs.
What does work is the ability to type in the free-form text in a text box and have it check your version by performing a color-diff of what is correct or incorrect against the original.
While John 1:1 is given as a default example, you can click the list-icon in the upper-right of the card UI, to flip the card over, and at that point you can edit the number of things you wish to be tested on. It allows you to add, delete, or edit any ‘card’ of text that you wish to memorize. You just have to provide a title (prompt) and the text (what you want to learn).
Currently because there is no backend, you can add as many items as you wish during a web session, but if you navigate away or close your browser, all the data you entered will be lost.
The plan for this is to try and bring in a lightweight backend for user identity as well as some permanent storage. I would like to keep a free, anonymous version available by utilizing browser storage, such that you could use the same browser on the same machine indefinitely, for free.
Desktop Status App
I often visit a few sites daily or every other day to check in on numbers, but it often takes a bit of time to do this, and I’m really only ever interested in a few numbers on those sites.
This little status app is built using Electron and Puppeteer to crawl various websites for information and then update it on my Mac’s status bar. A quick drop down menu shows me additional detail, allows me to visit the source website if I feel I need to, and also shows a dashboard window with last-updated timestamps.
It’s fairly interesting in that the Electron app uses a full headless version of Chrome to scrape these websites because they use dynamic content for a few of them and there is no way to do a simple GET request to update the information.
While the information I display is very specific to my needs, you could swap it for just about anything you can navigate to on the web. Here are my data points:
- Allergy information (specifically cedar pollen counts in Austin, TX)
- Williamson County (north Austin) covid data (specifically new daily cases)
- Crypto prices (Bitcoin, Ethereum, Polygon, etc.)
Different data updates with different frequencies and this little app runs all the time on my personal machine, saving me time every day and throughout the day from having to visit sites for this information.
Github quick-start web project template
- https://github.com/ksturner/express-react-parcel-ts-tailwindcss
- https://github.com/ksturner/fastify-react-parcel-gql-tailwindcss
This is a great little template that I’ve used to create quick single page web apps with React.js, TailWindCSS, Express.js and Parcel. The code is succinct and contains all the pieces necessary to get something going quickly. It’s also using Typescript which provides great type safety for modern JS apps.
NOTE: There is another variety of this template listed above that swaps out Express for Fastify, and brings in GraphQL support, but is otherwise the same as this version.
If you’re unfamiliar with some of the frameworks I just listed, here’s a little rundown of what they are and do:
- React.js - Frontend layout framework. Structures the pages, views, etc.
- TailWindCSS - A great classname-based css framework that essentially uses css aliases for common css needs.
- Express.js - A backend web server using Node.js.
- Fastify - Faster than Express.js; see it in the sister repo listed above.
- Parcel - A JS/Web compiler/bundler. If you’ve heard of webpack, this is comparable, just with less headache.
Now, there are a lot of quick start frameworks out there, and I like quite a few of them.
Some of the popular React ones are Next.js
and create-react-app
. However, with both
of them, and really any opinionated quick-start framework, you do run into cases
where it’s a black box. Yes, you can usually manually get around these, but often at
the cost of breaking some of the benefits of the framework. The reason I created
my little quickstart template was because I desired something that was simple, complete,
and not quite as opinionated when it came to the overall setup. All of these independent
frameworks provide something without requiring the others, or any real constraints on
the whole. You can drop them, add to them, swap them out with something else and
often times, this more flexible base provides me with opportunity to change as
the requirements of the app I’m building do. That’s not taking anything away from the
amazing work that the folks at Vercel have done with Next.js, or any others like
them, but this filled a need for me. Maybe it does for you too.
PaddleSwap.com
This version is a quick refactor of a much older version of PaddleSwap that has existed since about 2005. The main premise of the site is to provide a geographic map of used paddling boats and gear. This was to scratch a personal itch I had.
The original version was entirely written in PHP with some Python web crawlers doing basic scraping of sites like Ebay, Craigslist and various bulletin board sites around various paddling communities.
Fast forward to 2022 and things have changed. This version uses React, WebGL for the map, and a full headless Chrome browser using Javascript’s Puppeteer framework to render dynamic web sites for data. The backend database has shifted away from MySQL to MongoDB simply for the flexibility of the schemaless, page oriented documents that are collected from the crawlers.
There is still a lot to bring back, such as the user accounts. The old Paddleswap had hundreds of active users and generated a fair bit of monthly revenue. This new site probably has every ability to do that as well, if if if, the data can be collected efficiently. A lot has changed with the web since 2005 and many sites are siloed behind walls that prevent bots from accessing data conveniently without paying for dedicated apis. Those apis may be necessary for certain sites but there are other tasks to solve before that question can be answered.
BlackPaddle.com
This is a rather basic site, but does demonstrate some svg animations using TailWindCSS for much of the styling.