Tell us what works and what could be better. We read every submission.
@ankuagar·13 public vizzes
This example demonstrates how to download an entire website for offline viewing using the wget command-line tool. It shows a single shell command that recursively fetches all pages, along with their associated assets like CSS, JavaScript, and images. The command uses wget flags such as `--recursive`, `--page-requisites`, and `--convert-links` to ensure the downloaded site works locally, while `--domains` and `--no-parent` restrict crawling to the specified domain and directory. The code is presented as a commented shell script.
This example demonstrates how to obtain GKE basic authentication credentials from a cluster’s metadata and use them to construct a kubeconfig file for subsequent kubectl commands. The script fetches the cluster metadata via `gcloud container clusters describe`, then uses `jq` to extract the CA certificate, endpoint, and password. It writes a kubeconfig file with the admin username and password, then runs `kubectl get clusterroles` against that config to verify access. The code relies on the Google Cloud CLI and `jq` for JSON parsing.
This cheat sheet shows operational commands for debugging a Kubernetes cluster, organized by component such as K8s cluster, etcd, networking, and worker nodes. It lists shell commands and kubectl invocations for retrieving cluster info, viewing logs, and inspecting DNS or node status, with links to official documentation. The plain-text markdown file uses code blocks and headings to group commands by topic, relying on Kubernetes APIs like `kubectl get`, `kubectl logs`, and `journalctl`. It does not include charts or interactive elements; the rendering is static text.
This Makefile example demonstrates a complete workflow for building, running, tagging, and publishing a Docker container to AWS-ECR. It defines targets for building the container (build, build-nc), running it locally (run, up), stopping it (stop), and releasing it (release) by combining build and publish operations. The publish process logs into AWS ECR via aws-cli (with optional profile and region settings) and pushes both `latest` and versioned tags. Additional targets handle tagging, version output, and help documentation. The example includes a second variant using docker-compose for development workflows, plus supporting configuration files (config.env, deploy.env) and a usage script that explains installation and common commands.
The visualization displays a set of SQL query results from a weather and bike-share database, showing data such as the hottest day by zip code, trip counts by station, shortest trip duration, and average trip duration by end station. It uses Python with SQLite queries to extract the data, then renders the results in a web-based chart. The code references the `sqlite3` library for database access and likely employs a JavaScript charting library like D3.js to plot the aggregated values, though the specific rendering API is not fully visible in the provided snippet.
Java Reading Notes shows how Java 8 lambdas and closures replace older imperative approaches through annotated code snippets from a Guava-based tutorial. The gist demonstrates three implementations of `cloneWithoutNulls`—using Google Guava’s `Collections2.filter`, Java 8 `Predicate.isEqual`, and a lambda with `removeIf`—alongside examples of `Function`, `Supplier`, `BiFunction`, `Consumer`, and `BinaryOperator` interfaces. It also illustrates method references via the `::` operator and partial application with a custom `applyPartial` helper, rendering the progression from boilerplate to concise functional style in Markdown-formatted notes.
This example demonstrates how to send POST requests with curl using both `application/x-www-form-urlencoded` and `application/json` content types. It shows the curl options for specifying request methods (`-X POST`), data (`-d`), headers (`-H`), and file-based payloads via `@data.txt` or `@data.json`. The accompanying Express server uses `body-parser` to parse incoming request bodies and log them to the console, providing a concrete test target for the curl commands.
This example compares four functional programming languages—OCaml, JSJS, Clojure, and Scala—each implementing the Sieve of Eratosthenes to count primes up to a given integer. The code shows recursive filtering of a list range, using language-specific constructs like OCaml’s `List.filter`, Clojure’s `loop`/`recur`, and Scala’s `def aux` with list operations. The visualization highlights syntactic and structural differences across languages, with each snippet sharing the same algorithmic logic. The data source is the inline code itself, illustrating how each language handles list generation, recursion, and modular arithmetic.
This example visualizes the structure and organization of wget commands from a text-based guide, categorizing them into groups like downloading single files, mirroring websites, handling restricted content, and retrieving file details. The visualization uses a tree layout with collapsible nodes, rendered via D3.js, to display command categories and their associated examples. Each leaf node represents a specific wget command with its option flags, while the hierarchy reflects the logical grouping from the source document. The data is parsed directly from the original text, preserving the command syntax and descriptions. The interface allows users to expand and collapse branches to explore the command reference interactively.
A plain-text quotation from Rich Hickey’s critique of breadth-first learning is rendered as a static paragraph, with the cited “leveling up” phrase and the two key skills—knowledge acquisition and problem solving—emphasized via bold styling. The layout uses a single column of justified text with a light background, preserving the original comment’s structure without interactive elements. The data source is the verbatim gist content, and the visualization relies solely on HTML and CSS for typographic hierarchy, not on any JavaScript libraries or charting APIs.
This example demonstrates basic HTTP server patterns in Go, showing how to build routes with public and private endpoints. It uses the standard `net/http` package to define handlers for the root, `/post`, and `/json` routes, with middleware wrappers like `BasicAuth`, `GetOnly`, and `PostOnly` controlling access. The code includes functions for basic authentication, request method filtering, and JSON responses via `encoding/json`. A shell script runs `curl` commands to test the server’s behavior.
This example demonstrates a minimal HTTP server in Go that parses JSON from a request body and returns it as a response. The code reads the incoming request with `ioutil.ReadAll`, decodes it into a `Message` struct using `encoding/json`’s `json.Unmarshal`, then re-encodes the struct with `json.Marshal` before writing the result back with `w.Write`. The server uses the standard `net/http` package, registering a handler on the root path with `http.HandleFunc` and listening on port 8000 via `http.ListenAndServe`. It shows a round-trip JSON workflow without any external libraries or rendering.