npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ensure-sync

v0.0.5

Published

CLI utility which helps ensure whether two directories over an SSH network are actually synced. This is especially useful for services like Dropbox, which often lie to you about true sync status :)

Downloads

2

Readme

ensure-sync

Ensure-sync is a CLI utility which allows you to verify whether or not two folders over a SSH network are synced.

For example, services like Dropbox purport to keep folders in sync, but sometimes they lie (especially over poor internet connections :) This program can help you verify whether such folders are in sync and, if not, help you pinpoint where the mismatch is at.

Installation

$ npm install -g ensure-sync

Instructions

First, launch the program (you must launch this in sudo for this script to work):

$ sudo ensure-sync

Next, you will be prompted to enter 4 pieces of information: (i) your target SSH address (e.g., [email protected]), (ii) your target SSH port (e.g., 22), (iii) your source folder (e.g., a folder on your local machine), and (iv) your target folder (e.g., a folder on the SSH machine). Note that for (iii) and (iv) you must use full paths (unfortunately, this program can't handle environment variables or ~).

After inputing this information, sit back and wait while hash values are computed for each folder and file (depending upon how large your folders are, this can end up taking several seconds). NOTE: It's best if you are set up to SSH via key authentication (otherwise, you will be repeatedly asked to enter your password as the script traverses through each file and subdirectory).

Interpreting the Output

The output of this command will look something like the following:

	b36ea4e02d9d387930ef8acceb7ccdc78e4082ae  -
	b36ea4e02d9d387930ef8acceb7ccdc78e4082ae  -
	/home/user/dir1 is synced
	52b2cd71188d96c4f99f20d21d5fa59b9ded8af5  -
	3d41429acfaceb6ea504c4ebbd6afda04d3d0bc6  -
	/home/user/dir2 is not synced

Those big strings are just hash sha1 values computed from your folders and files. Indeed, all this program does is compute sha1 hashes for each of your system's files, and compares them to infer whether or not they are in sync.

Requirements

  • A unix system.
  • npm + nodejs