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

@tpaul/csign

v1.0.3

Published

Create signed URLs for Triton Cloud API.

Downloads

16

Readme

CSign

A Cloud API URL signing utility.

Usage:

Create a signed URL for a Triton Cloud API PATH
Usage:
  csign sign PATH
Options:
    -m METHODS, --method=METHODS  Comma separated list of HTTP methods (default:
                                  HEAD,GET).
    -P, --prefix                  Don't prefix PATH with authenticating user
                                  (Default: true).
    -p ARG, --profile=ARG         Load the specified profile from
                                  ~/.triton/profiles.d.
    -u ARG, --user=ARG            Set the Cloud API user (overrides value in
                                  profile, if any).
    -k ARG, --key=ARG             Set the SSH Key ID (overrides value in
                                  profile, if any).
    -H ARG, --host=ARG            Set the Cloud API Host (overrides value in
                                  profile, if any).
    -v, --verbose                 Verbose output.
    -n ARG, --novnc=ARG           Output provided link with noVNC URL parameters
                                  appended (Useful for the ConnectMachineVNC
                                  endpoint).

Example:

This example creates a signed URL for use with (a slightly modified¹) noVNC in the browser:

$ open "$(./csign sign -n https://us-central.manta.mnx.io/tpaul/public/test/noVNC/vnc_lite.html /machines/97440717-0646-4fde-a173-e3ecc195d4a9/vnc)"

Example listing packages:

$ curl -s "$(./csign sign -p local packages)" | jq
[
  {
    "default": false,
    "description": "g1.micro",
    "disk": 10240,
    "group": "General",
    "id": "58d53657-6690-e40c-bb20-d0d280817f44",
    "lwps": 4096,
    "memory": 1024,
    "name": "g1.micro",
    "swap": 2048,
    "vcpus": 1,
    "version": "1.0.0"
  },
  {
    "brand": "joyent",
    "default": false,
    "description": "",
    "disk": 32768,
    "group": "",
    "id": "33c926a9-ba99-4c58-a386-5db59ef74c27",
    "lwps": 4000,
    "memory": 4096,
    "name": "build-zone",
    "swap": 8192,
    "vcpus": 4,
    "version": "1.0.0"
  },
  {
    "brand": "kvm",
    "default": false,
    "description": "",
    "disk": 40960,
    "group": "",
    "id": "b39caf66-cfaf-43a9-aff9-a426d17d5880",
    "lwps": 4096,
    "memory": 2048,
    "name": "kvm.1",
    "swap": 4096,
    "vcpus": 2,
    "version": "1.0.0"
  }

¹: noVNC's vnc_lite.html prefixes the path with / which is undesirable here.

diff --git a/vnc_lite.html b/vnc_lite.html
index e725a2d..f72115f 100644
--- a/vnc_lite.html
+++ b/vnc_lite.html
@@ -157,7 +157,7 @@
         if(port) {
             url += ':' + port;
         }
-        url += '/' + path;
+        url += path;

         // Creating a new RFB object will start a new connection
         rfb = new RFB(document.getElementById('screen'), url,