Tooling Icon

Tooling

Tooling and apps used to create and deliver awesome software.
129 Stories
All Topics

Patrick DeVivo augmentable.medium.com

Identifying code churn with AskGit SQL

In which I detail A SQL query that helps you identify files in a codebase that have “churned” in the past year. In other words, list the files that have been changed by the most number of commits in the last year.

SELECT file,
       COUNT(*)
FROM   stats
       JOIN commits
         ON stats.commit_id = commits.id
WHERE  commits.author_when > DATE('now', '-12 month')
       AND commits.parent_count < 2 -- ignore merge commits
GROUP  BY file
ORDER  BY COUNT(*) DESC
LIMIT  50

GitHub github.com

An uptime monitor and status page powered by GitHub Actions

Okay this is pretty stinkin’ clever.

  • GitHub Actions is used as an uptime monitor
    • Every 5 minutes, a workflow visits your website to make sure it’s up
    • Response time is recorded every 6 hours and committed to git
    • Graphs of response time are generated every day
  • GitHub Issues are used for incident reports
    • An issue is opened if an endpoint is down
    • People from your team are assigned to the issue
    • Incidents reports are posted as issue comments
    • Issues are locked so non-members cannot comment on them
    • Issues are closed automatically when your site comes back up
    • Slack notifications are sent on updates
  • GitHub Pages are used for the status website
    • A simple, beautiful, and accessible PWA is generated
    • Built with Svelte and Sapper
    • Fetches data from this repository using the GitHub API

Command line interface github.com

cheat lets you access interactive cheatsheets from the CLI

It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.

Let’s imagine a completely hypothetical world where it’s the umpteenth time you’ve used it, but you still can’t remember which flags to send to tar… so you run:

cheat tar

You’ll be greeted by:

# To extract an uncompressed archive:
tar -xvf '/path/to/foo.tar'

# To extract a .gz archive:
tar -xzvf '/path/to/foo.tgz'

# To create a .gz archive:
tar -czvf '/path/to/foo.tgz' '/path/to/foo/'

# To extract a .bz2 archive:
tar -xjvf '/path/to/foo.tgz'

# To create a .bz2 archive:
tar -cjvf '/path/to/foo.tgz' '/path/to/foo/'

The cheatsheets themselves are community-sourced.

Command line interface github.com

An intuitive CLI for processing video (powered by ffmpeg)

ffmpeg is an incredibly powerful tool, but its many flags and options make it not the easiest thing to wield (especially if you use it just infrequently enough to forget the magic syntax you ginned up last time).

vdx makes ffmpeg more approachable for many of the common video processing operations you may need on a regular basis. Examples!

$ vdx '*.mov' --crop=360,640    # Crop to width 360, height 640
$ vdx '*.mov' --format=gif      # Convert to GIF
$ vdx '*.mov' --fps=12          # Change the frame rate to 12
$ vdx '*.mov' --no-audio        # Strip audio
$ vdx '*.mov' --resize=360,-1   # Resize to width 360, maintaining aspect ratio
$ vdx '*.mov' --reverse         # Reverse
$ vdx '*.mov' --rotate=90       # Rotate 90 degrees clockwise
$ vdx '*.mov' --speed=2         # Double the speed
$ vdx '*.mov' --trim=0:05,0:10  # Trim from time 0:05 to 0:10
$ vdx '*.mov' --volume=0.5      # Halve the volume

Ruurtjan Pul nslookup.io

NsLookup.io – an online tool for exploring DNS records

Ruurtjan Pul writes:

It’s been my side project for the past half year. In contrast to existing alternatives, my aim is for it to be simple, powerful, user-friendly. I’ll be adding more features the coming time, but it should be useful as is already.

I ran a few test lookups to kick the tires and the site is fast, simple, and displays the information in an easily digestible format. Worth a bookmark!

Romain Barissat github.com

A GitHub Action to maintain mono-to-many repos

Romain Barissat:

I made this to be able to open-source parts of our monorepo while keeping the rest private.

The result is a tool that allows you to have one monorepo that is the source of truth for as many other repos as you want. It could also be used to create “workspace” repos if you onboard a freelance and you don’t want to give him access to your whole mono-repo.

We are using nx as a monorepo tool, here is an example of it using the Copybara Action

Based on Google’s Copybara project.

Marko Saric plausible.io

Plausible Analytics is ready for self-hosting 👏

Listeners of The Changelog have already heard Plausible’s story. On that show we talked about self-hosting and how that was something the team was interested in, but hadn’t gotten around to it yet.

Well, now they’ve gotten around to it.

We started developing Plausible early last year, launched our SaaS business and you can now self-host Plausible on your server too! The project is battle-tested running on more than 5,000 sites and we’ve counted 180 million page views in the last three months.

Rust github.com

binserve – a fast static web server in a single binary

This web server for static assets is “blazing fast” and executable with a single binary, but what excites me about it is the simplistic, singular config file: binserve.json

{
  "directory_listing": false,
  "enable_logging": true,
  "error_pages": {
    "404": "404.html"
  },
  "follow_symlinks": false,
  "routes": {
    "/": "index.html",
    "/example": "example.html"
  },
  "server": {
    "host": "127.0.0.1",
    "port": 1337
  },
  "static_directory": "static",
  "template_variables": {
    "load_static": "/static/",
    "name": "Binserve"
  }
}

Security github.com

Endlessh – an SSH tarpit that slowly sends an endless banner

The idea here is you put your real SSH server on a different port and let Endlessh lock up the script kiddies for hours and even days.

Since the tarpit is in the banner before any cryptographic exchange occurs, this program doesn’t depend on any cryptographic libraries. It’s a simple, single-threaded, standalone C program. It uses poll() to trap multiple clients at a time.

I’m not sure if this is actually a good idea or just fun to put into practice like those people who dedicate their precious free time scambaiting.

Tooling github.com

youtube-dlc is the new youtube-dl

Open source software shows its resiliency once again:

youtube-dlc is a fork of youtube-dl with the intention of getting features tested by the community merged in the tool faster, since youtube-dl’s development seems to be slowing down.

If you’re unaware of youtube-dl, it’s like a Swiss Army Knife for downloading videos from the web. It’s a great tool and I’m happy to see the community rally around its maintenance.

Terminal github.com

What's new in htop 3

Everyone’s (or at least my) favorite system monitoring tool is still alive and kickin’ with a big 3.0 release. In addition to a new display option to show CPU frequency in CPU meters, optional vim key mapping mode, and many other goodies, the big news is this:

New maintainers - after a prolonged period of inactivity from Hisham, the creator and original maintainer, a team of community maintainers have volunteered to take over a fork at htop.dev and github.com/htop-dev to keep the project going.

Open source FTW!

More good news: Hisham has agreed to join us on Maintainer Spotlight!

Amazon Web Services github.com

An opinionated full-stack boilerplate for production AWS apps

The primary objective of this boilerplate is to give you a production ready code that reduces the amount of time you would normally have to spend on system infrastructure’s configuration. It contains a number of services that a typical web application has (frontend, backend api, admin panel, workers) as well as their continuous deployment. Using this boilerplate you can deploy multiple environments, each representing a different stage in your pipeline.

An opinionated full-stack boilerplate for production AWS apps
0:00 / 0:00