| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Add a Makefile to install the binary in GOPATH and the unit file for the
service. When the binary is installed, systemd is reloaded and the
service is also started.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As I want the scrobbler to be started automatically when I log into my
session, the easiest way to do this is by having a systemd unit file
that I run for my own user.
The unit expects that the binary for the scrobbler is under my $GOPATH,
which is hard coded for now. We also ensure that the binary exists
before starting the unit.
We harness the service with a number of directives.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
If the status of the player is "stop", we don't have a new song to
handle. In this case, if there's a current song, let's update the status
and clear our state.
Closes #1.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add a column `playtime` to the records table to keep track of how long a
song was played.
With this information, in the future, we will be able to sum up how long
we listen to music, but also which songs were skipped.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The program needs two arguments: the mpd host and port, which can be
passed as flags (default is to use the local instance of mpd).
We store the database in `XDG_CONFIG_HOME/mpd-scrobbler`, and we create
the path if needed.
|
| | |
| |
| |
| |
| |
| | |
To compare the current attributes with the current record, we can use
the helper `EqualAttrs` which will tell us if we need to create a new
record or not.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When creating a scrobbler, we provide the path to the database. The
scrobbler then get a handler to the database.
When a new record is created, we persist it to the database using the
`save` function.
|
| | |
| |
| |
| | |
When we create a new record, let's capture when this was created.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We want to persist the records in a database, so we can extract
statistics and an history.
The module for the database is straightforward: it opens the database if
it exists and return an handler to it. If the database does not exists,
we create it and we create the only table we need (records).
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a new function to create a scrobbler. The function takes care of
creating the mpd client.
Add a function to run the scrobbler, which takes care of creating a new
record when needed.
This will simplify the interface for the caller, as all they really care
about is: create the scrobbler, close it when we're done, and collect
songs information while we listen to our music.
|
| | | |
|
| | |
| |
| |
| |
| | |
Let's close both the watcher and the client, instead of leaking this
interface to the user.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
When we receive an event from the player, we look if the song is
different from the previous one, and we create a new record if that's
the case. If the song is similar, there's nothing to do.
|
| | |
| |
| |
| |
| | |
Define the type for a log record and add an helper function to create a
new record.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We create a module "mpd" to interact with our MPD instance. For now we
only have a single function to create a new client, which creates an
actual client for mpd (and we ping the instance every 30 seconds), and
a watcher to receive new events.
The tool "scrobbler" then wait for new events and display songs
information.
|
| | |
| |
| |
| | |
Describe what is being collected.
|
| | | |
|
| | | |
|
| |
|
|
| |
This commit is empty on purpose.
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | |\
| | |
| | | |
build(deps): bump clap from 4.5.4 to 4.5.8
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.4 to 4.5.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.8)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |\ \
| | |/
| |/|
| | |
| | | |
fcuny/dependabot/github_actions/DeterminateSystems/update-flake-lock-23
build(deps): bump DeterminateSystems/update-flake-lock from 21 to 23
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [DeterminateSystems/update-flake-lock](https://github.com/determinatesystems/update-flake-lock) from 21 to 23.
- [Release notes](https://github.com/determinatesystems/update-flake-lock/releases)
- [Commits](https://github.com/determinatesystems/update-flake-lock/compare/v21...v23)
---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |\
| | |
| | | |
Update flake.lock
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Flake lock file updates:
• Updated input 'fenix':
'github:nix-community/fenix/9a025daf6799e3af80b677f0af57ef76432c3fcf' (2024-06-01)
→ 'github:nix-community/fenix/bedf55efd03d4796a3ddb267d7e081cc6b34483d' (2024-06-22)
• Updated input 'fenix/rust-analyzer-src':
'github:rust-lang/rust-analyzer/d6d735e6f20ef78b16a79886fe28bd69cf059504' (2024-05-31)
→ 'github:rust-lang/rust-analyzer/c4681ea2cc1f2d1e1a0568ad03069c57bdcd7a88' (2024-06-21)
• Updated input 'naersk':
'github:nix-community/naersk/fa19d8c135e776dc97f4dcca08656a0eeb28d5c0' (2024-05-30)
→ 'github:nix-community/naersk/941ce6dc38762a7cfb90b5add223d584feed299b' (2024-06-18)
• Updated input 'nixpkgs':
'github:nixos/nixpkgs/6132b0f6e344ce2fe34fc051b72fb46e34f668e0' (2024-05-30)
→ 'github:nixos/nixpkgs/90338afd6177fc683a04d934199d693708c85a3b' (2024-06-21)
|
| | |\ \
| | |/
| |/| |
build(deps): bump webpki-roots from 0.26.1 to 0.26.3
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [webpki-roots](https://github.com/rustls/webpki-roots) from 0.26.1 to 0.26.3.
- [Release notes](https://github.com/rustls/webpki-roots/releases)
- [Commits](https://github.com/rustls/webpki-roots/compare/v/0.26.1...v/0.26.3)
---
updated-dependencies:
- dependency-name: webpki-roots
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |\
| | |
| | | |
build(deps): bump rustls from 0.23.5 to 0.23.8
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.5 to 0.23.8.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.5...v/0.23.8)
---
updated-dependencies:
- dependency-name: rustls
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |\ \
| | |/
| |/| |
Update flake.lock
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Flake lock file updates:
• Updated input 'fenix':
'github:nix-community/fenix/297c756ba6249d483c1dafe42378560458842173' (2024-05-10)
→ 'github:nix-community/fenix/9a025daf6799e3af80b677f0af57ef76432c3fcf' (2024-06-01)
• Updated input 'fenix/rust-analyzer-src':
'github:rust-lang/rust-analyzer/5bf2f85c8054d80424899fa581db1b192230efb5' (2024-05-09)
→ 'github:rust-lang/rust-analyzer/d6d735e6f20ef78b16a79886fe28bd69cf059504' (2024-05-31)
• Updated input 'naersk':
'github:nix-community/naersk/c5037590290c6c7dae2e42e7da1e247e54ed2d49' (2024-04-19)
→ 'github:nix-community/naersk/fa19d8c135e776dc97f4dcca08656a0eeb28d5c0' (2024-05-30)
• Updated input 'nixpkgs':
'github:nixos/nixpkgs/af8b9db5c00f1a8e4b83578acc578ff7d823b786' (2024-05-12)
→ 'github:nixos/nixpkgs/6132b0f6e344ce2fe34fc051b72fb46e34f668e0' (2024-05-30)
|
| | |\
| | |
| | | |
Update flake.lock
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Flake lock file updates:
• Updated input 'fenix':
'github:nix-community/fenix/94be183087845937b0fd77281c37d0796572b899' (2024-04-28)
→ 'github:nix-community/fenix/297c756ba6249d483c1dafe42378560458842173' (2024-05-10)
• Updated input 'fenix/rust-analyzer-src':
'github:rust-lang/rust-analyzer/f216be4a0746142c5f30835b254871256a7637b8' (2024-04-27)
→ 'github:rust-lang/rust-analyzer/5bf2f85c8054d80424899fa581db1b192230efb5' (2024-05-09)
• Updated input 'nixpkgs':
'github:nixos/nixpkgs/2b1f64b358f2cab62617f26b3870fd0ee375d848' (2024-04-27)
→ 'github:nixos/nixpkgs/af8b9db5c00f1a8e4b83578acc578ff7d823b786' (2024-05-12)
|
| | | |
|
| | |\
| | |
| | | |
bump a number of dependencies to their latest versions
|
| | |/
| |
| |
| | |
Updating all these dependencies required some significant code change.
|
| | |\
| | |
| | | |
build(deps): bump clap from 4.0.18 to 4.5.4
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.18 to 4.5.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.18...v4.5.4)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |
| |
| |
| |
| |
| | |
```
error: use of deprecated method `rustls::RootCertStore::add_server_trust_anchors`: Please use `add_trust_anchors` instead
```
|
| | | |
|
| | |\
| | |
| | | |
build(deps): bump rustls from 0.20.7 to 0.21.10
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [rustls](https://github.com/rustls/rustls) from 0.20.7 to 0.21.10.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.20.7...v/0.21.10)
---
updated-dependencies:
- dependency-name: rustls
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |\
| | |
| | | |
build(deps): bump anyhow from 1.0.70 to 1.0.82
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.70 to 1.0.82.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.70...1.0.82)
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |\ \
| | |/
| |/| |
build(deps): bump x509-parser from 0.14.0 to 0.16.0
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [x509-parser](https://github.com/rusticata/x509-parser) from 0.14.0 to 0.16.0.
- [Release notes](https://github.com/rusticata/x509-parser/releases)
- [Changelog](https://github.com/rusticata/x509-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rusticata/x509-parser/compare/x509-parser-0.14.0...x509-parser-0.16.0)
---
updated-dependencies:
- dependency-name: x509-parser
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | | |
|
| | |
| |
| |
| |
| | |
This is mostly coming from
https://github.com/DeterminateSystems/nix-installer/blob/main/flake.nix
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the `--insecure` flag so we can check certificates that are expired.
When using the short format for the output (the default), if the
certificate has expired, it will report how many days ago.
For certificates that have not expired, the remaining number of days
will be printed.
|
| | | |
|
| | |\
| | |
| | |
| | |
| | |
| | | |
cert' (#3) from fcuny/rendering into main
Reviewed-on: https://git.fcuny.net/fcuny/x509-info/pulls/3
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most of the time, all I want is to know when the certificate is going to
expire. In some cases, I might want to see more details.
This change introduce a new argument to the CLI to select what level of
information to print. The new option (`--format`) will by default print
the short summary, like this:
```
> ./target/debug/x509-info twitter.com
twitter.com is valid until Mon, 12 Dec 2022 15:59:59 -0800 (29 days left)
```
While with `--format long` we get the following:
```
> ./target/debug/x509-info --format long twitter.com
certificate
version: V3
serial: 0d:e1:52:69:6b:2f:96:70:d6:c7:db:18:ce:1c:71:a0
subject: C=US, ST=California, L=San Francisco, O=Twitter, Inc., CN=twitter.com
issuer: C=US, O=DigiCert Inc, CN=DigiCert TLS RSA SHA256 2020 CA1
validity
not before : Sun, 12 Dec 2021 16:00:00 -0800
not after : Mon, 12 Dec 2022 15:59:59 -0800
validity days : 364
remaining days: 29
SANs:
DNS:twitter.com
DNS:www.twitter.com
```
|
| | |\
| | |
| | |
| | |
| | |
| | | |
into main
Reviewed-on: https://git.fcuny.net/fcuny/x509-info/pulls/2
|
| | | | |
|
| | |/ |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Flake lock file updates:
• Updated input 'flake-utils':
'github:numtide/flake-utils/c0e246b9b83f637f4681389ecabcb2681b4f3af0' (2022-08-07)
→ 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/d3c2379d149073e53eb5580deafad475c1cabe28' (2022-10-20)
→ 'github:NixOS/nixpkgs/1d29ae3a66395506fd85655a8d74279ad4f9098f' (2022-11-08)
• Updated input 'pre-commit-hooks':
'github:cachix/pre-commit-hooks.nix/1b436f36e2812c589e6d830e3223059ea9661100' (2022-10-24)
→ 'github:cachix/pre-commit-hooks.nix/06f48d63d473516ce5b8abe70d15be96a0147fcd' (2022-11-06)
• Updated input 'rust-overlay':
'github:oxalica/rust-overlay/dd334e95eb46e79e52a75c80ef9ba73c3d867840' (2022-10-20)
→ 'github:oxalica/rust-overlay/9235990723630e1a55e1ed6bca5954e4e31cfbd7' (2022-11-08)
|
| | | |
|
| | |\
| | |
| | |
| | |
| | |
| | | |
fcuny/drone-ci into main
Reviewed-on: https://git.fcuny.net/fcuny/x509-info/pulls/1
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I'm running my own CI at ci.fcuny.net using drone for now. I've spare
compute capacity at home, and it's way faster than the GHA runners.
For now I'm losing the following:
- dependabot: that's a GitHub only function, I'll need to figure out
something
- nix flake update: I'll need to figure out a way to update flakes on a
regular basis, probably a custom script to take care of that
|
| | |\ |
|
| | |/
| |
| |
| |
| |
| |
| | |
crane is a nix library to build cargo projects, similar to naersk. The
main advantage over naersk is the composability.
I'll give it a try and see if it's faster for local development.
|
| | |\ |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of relying on GitHub actions to check/test/build the code, I can
rely entirely on nix to do these steps. This has the added benefit that
the workflow will be similar to my local environment and make it easy to
test the worfklow before running it on GitHub.
|
| | | |
| | |
| | |
| | | |
See https://github.com/chronotope/chrono/issues/602 for more details.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We can build a rust binary without naesrk,with the help of
`buildRustPackage`.
Simplify a bit the overall build by consuming information from
Cargo.toml and Cargo.lock.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
cargo-deny is a plugin to lint a project's dependency graph. This allow
me to set which licenses are allowed for the dependencies, and configure
the security vulnerability database.
|
| | |/ |
|
| | |\
| | |
| | | |
build(deps): bump clap from 4.0.17 to 4.0.18
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.17 to 4.0.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.17...v4.0.18)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Read the domain name from the CLI, and get and print information about
the certificate to STDOUT.
The output looks like this:
```
> ./target/debug/x509-info badssl.com
Subject: CN=*.badssl.com O= L=
Issuer: CN=R3 O=Let's Encrypt L=
DNS Names: *.badssl.com, badssl.com
Validity Period
Not before: 2022-08-12T07:57:46-07:00
Not After: 2022-11-10T06:57:45-08:00
```
|
| | | |
|
| |
|
|
|
| |
Create the initial scaffolding for a rust project, using `cargo` and a
nix template.
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |\
| | |
| | | |
Bump thiserror from 2.0.9 to 2.0.11
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.9 to 2.0.11.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.9...2.0.11)
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |\
| | |
| | | |
report the number of E cores and P cores
|
| | | | |
|
| | |/
| |
| |
| | |
Report the CPU and GPU bandwidths for some of the M core models.
|
| | |\
| | |
| | | |
Bump thiserror from 1.0.61 to 2.0.9
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.61 to 2.0.9.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...2.0.9)
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| | |/ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Create a binary named `apple_silicon`, and add a library named to the
project, so it can be re-used by external projects.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add the TDP for the GPUs and CPUs, for the models we know about. Apple
does not publish information about TDP so we're going to have to gather
that information by going over various sites.
Add some unit tests.
|
| | | |
|
| | | |
|
| | | |
|
| |
|
|
|
|
|
|
|
|
| |
```
[18:04] mba-fcuny:apple_silicon (main +) | cargo run
Compiling apple_silicon v0.1.0 (/Users/fcuny/workspace/apple_silicon)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
Running `target/debug/apple_silicon`
our CPU is an Apple M2, and we have 8 cores, and 10 GPU cores
```
|
| | |
|
| |
|
|
|
| |
Generates ASCII histograms using Unicode block characters for sequences
of numbers provided via command line arguments or STDIN input.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Go vanity URLs allow developers to use custom domain names for Go module
imports instead of being tied to specific hosting platforms like GitHub.
This service implements the go-import meta tag protocol, allowing Go tools
to automatically discover the actual Git repository location while
presenting a clean, branded import path to users.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Add a flake.nix to manage the development shell, the formatters, add
some pre-commit checks, and such.
This might evolve a bit over time but this is a good starting point.
|
| | |
|
|
|
`pviz` is a command-line tool that helps you understand the real impact
of service availability targets (SLAs) by converting availability
percentages into actual downtime durations across different time
periods.
|