profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mdonoughe/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

mdonoughe/jgit-describe 7

An ant task that emulates git-describe using jgit

mdonoughe/jff2dot 3

A program to convert JFlap files to Graphviz files

mdonoughe/home-assistant-custom 1

Dockerfiles for modified Home Assistant

mdonoughe/homebrew 1

The missing package manager for OS X.

mdonoughe/homework2 1

a neural network visualization

mdonoughe/html5-boilerplate 1

starting html/css template. so much goodness baked in by default

mdonoughe/beats 0

A simple Rust library for Swatch Internet Time (.beats)

mdonoughe/bollard 0

Docker daemon API in Rust

issue commenthome-assistant/core

Login attemt or request with invalid auth from amazon

Are you using some sort of VPN or proxy service on your phone?

It's possible this is just internet background traffic, especially if you're using port 80 or 443 to expose Home Assistant to the internet. I wouldn't know because my Home Assistant is behind a reverse proxy and random scanning requests are unlikely to reach Home Assistant to be logged.

anders3408

comment created time in 11 hours

issue commentstarship/starship

Performance issue with PowerShell custom command

There is a way to make this faster than any other shell, but it would be a big change and it's possibly too expensive to maintain just for PowerShell. PowerShell and Windows PowerShell are .Net and have full access to the underlying .Net Core or .Net Framework capabilities. If Starship exposed a C API and could be loaded as a DLL, PowerShell could make calls into Starship without spawning a Starship process, but also a callback could be provided to let Starship execute PowerShell commands without initializing a completely new PowerShell instance.

egvimo

comment created time in 11 hours

PR opened starship/starship

feat: print-config subset of config

<!--- Provide a general summary of your changes in the Title above --> <!--- To help with semantic versioning the PR title should start with one of the conventional commit types. --> <!--- The conventional commit types for Semantic PR are: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert -->

Description

<!--- Describe your changes in detail -->

starship print-config now takes an optional number of paths to filter the configuration by. It doesn't look like the print-config command is documented so I didn't add documentation for this new behavior.

Motivation and Context

<!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> Closes #2934

Screenshots (if appropriate):

$ starship print-config git_status git_branch.format
# Warning: This config does not include keys that have an unset value

# $all is shorthand for $username$hostname$shlvl$singularity$kubernetes$directory$vcsh$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch$docker_context$package$cmake$cobol$dart$deno$dotnet$elixir$elm$erlang$golang$helm$java$julia$kotlin$lua$nim$nodejs$ocaml$perl$php$pulumi$purescript$python$rlang$red$ruby$rust$scala$swift$terraform$vlang$vagrant$zig$nix_shell$conda$memory_usage$aws$gcloud$openstack$env_var$crystal$custom$cmd_duration$line_break$jobs$battery$time$status$shell$character
[git_status]
format = '([\[$all_status$ahead_behind\]]($style) )'
style = 'red bold'
stashed = '\$'
ahead = '⇡'
behind = '⇣'
up_to_date = ''
diverged = '⇕'
conflicted = '='
deleted = '✘'
renamed = '»'
modified = '!'
staged = '+'
untracked = '?'
disabled = false

[git_branch]
format = 'on [$symbol$branch]($style)(:[$remote]($style)) '

How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, tests ran to see how --> <!--- your change affects other areas of the code, etc. -->

  • [ ] I have tested using MacOS
  • [ ] I have tested using Linux
  • [x] I have tested using Windows

Checklist:

<!--- Go over all the following points, and put an x in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

  • [ ] I have updated the documentation accordingly.
  • [x] I have updated the tests accordingly.
+123 -4

0 comment

2 changed files

pr created time in 12 hours

create barnchmdonoughe/starship

branch : print-config

created branch time in 12 hours

push eventmdonoughe/starship

Matthew Donoughe

commit sha 558c3c532c36b8a3cd32fff6056d574c89472dee

fix: init script line endings

view details

push time in 14 hours

PR opened starship/starship

Fix init script line endings

<!--- Provide a general summary of your changes in the Title above --> <!--- To help with semantic versioning the PR title should start with one of the conventional commit types. --> <!--- The conventional commit types for Semantic PR are: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert -->

Description

The .gitattributes file says /src/init/ text eol=lf, which applies the text eol=lf only to the directory, not to the files in the directory.

$ git check-attr -a src/init/starship.zsh

(no output)

By changing the rule to /src/init/* text eol=lf, it is applied to all files within the directory instead.

$ git check-attr -a src/init/starship.zsh
src/init/starship.zsh: text: set
src/init/starship.zsh: eol: lf

Motivation and Context

<!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> Closes #3099

How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, tests ran to see how --> <!--- your change affects other areas of the code, etc. -->

  • [ ] I have tested using MacOS
  • [ ] I have tested using Linux
  • [x] I have tested using Windows

I don't actually have zsh on Windows, but I can see the problem using xxd.

Before:

$ starship init zsh --print-full-init | xxd | tail -n 1
00001180: 4253 5f43 4f55 4e54 2229 270d 0a         BS_COUNT")'..

(note the 0d 0a sequence at the end)

After changing .gitattributes and doing a clean checkout of the init directory:

$ starship init zsh --print-full-init | xxd | tail -n 1
00001190: 4253 5f43 4f55 4e54 2229 270a 0a         BS_COUNT")'..

(now it's 0a 0a. The second 0a was introduced two weeks ago. The before test was with the release version so the second line feed was not present.)

Since this also applies to starship.ps1 I checked on Windows PowerShell 5.1 and PowerShell 7.1 (on Windows) and neither seem to care about the missing carraige returns.

Checklist:

<!--- Go over all the following points, and put an x in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

  • [ ] I have updated the documentation accordingly.
  • [ ] I have updated the tests accordingly.
+1 -1

0 comment

1 changed file

pr created time in 14 hours

create barnchmdonoughe/starship

branch : line-endings

created branch time in 15 hours

fork mdonoughe/starship

☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!

https://starship.rs

fork in 15 hours

issue commentstarship/starship

Starship can't read it config file when invoked from Git Bash on Windows

It doesn't look like any special configuration is required for using Starship with Git Bash.

In my starship.toml file I have disabled the AWS module so it should not be displaying, and it does not until I start changing the value of STARSHIP_CONFIG.

mdono@meshify MINGW64 /
$ eval "$(starship init bash)"

C:/Program Files/Git🔒
❯ export STARSHIP_CONFIG="$HOME/.config/starship.toml"

C:/Program Files/Git🔒
❯ echo "$STARSHIP_CONFIG"
/c/Users/mdono/.config/starship.toml

C:/Program Files/Git🔒
❯ export STARSHIP_CONFIG="~/.config/starship.toml"

C:/Program Files/Git🔒 on ☁️  (us-east-2)
❯ echo "$STARSHIP_CONFIG"
~/.config/starship.toml

When STARSHIP_CONFIG is set to "$HOME/.config/starship.toml", $HOME is expanded to the current value of $HOME, which is an MSYS path. When STARSHIP_CONFIG is set to "~/.config/starship.toml", ~ is not expanded.

When invoking Starship, if the environment variable was set to /c/Users/mdono/.config/starship.toml it becomes C:/Users/mdono/.config/starship.toml, which is technically invalid because it uses forward slashes, but most of the time you can get away with it due to path normalization and this is one of those cases. If the environment variable was set to ~/.config/starship.toml then its value is not changed when invoking Starship, and Starship will try to open a file named ./~/.config/starship.toml (which is a valid path and if you put a config file there then it will work).

I'm not seeing the problem here. This is the expected behavior according to regular shell expansion rules and file APIs. You get the same behavior when running on real Linux (in this case Ubuntu Focal).

mdono@meshify:~$ eval "$(starship init bash)"

~
❯ export STARSHIP_CONFIG="$HOME/.config/starship.toml"

~
❯ echo "$STARSHIP_CONFIG"
/home/mdono/.config/starship.toml

~
❯ export STARSHIP_CONFIG="~/.config/starship.toml"

~ on ☁️  (us-east-2)
❯ echo "$STARSHIP_CONFIG"
~/.config/starship.toml

Is there documentation somewhere that says the user needs to set STARSHIP_CONFIG to run under Git Bash and tells the user to set the variable using something like "~/.starship/starship.toml"? If so, I think it's the documentation that is wrong.

It looks like this does work if you do not quote the value.

❯ export STARSHIP_CONFIG=~/.config/starship.toml

~
❯ echo "$STARSHIP_CONFIG"
/home/mdono/.config/starship.toml

And the same on Git Bash:

C:/Program Files/Git🔒
❯ export STARSHIP_CONFIG=~/.config/starship.toml

C:/Program Files/Git🔒
❯ echo "$STARSHIP_CONFIG"
/c/Users/mdono/.config/starship.toml
Jarmos-san

comment created time in 15 hours

issue commentstarship/starship

hashicorp vault support (show token expiration time)

Is there any precedence for this? The AWS module prints the expiration time, but it just reads the expiration time from local sources. vault token lookup makes an API call to the Vault server. Probably what Starship should do is make the API call itself (spawning processes can expensive on Windows), and cache the expiration time somehow using the hash of the token so it can avoid making API calls every time the prompt needs to be rendered.

bbigras

comment created time in 16 hours

delete branch mdonoughe/serenity

delete branch : clippy

delete time in 2 days

pull request commentmdonoughe/sbz-switch

Added a "auto-switch" switch

The volume levels shouldn't be constants :)

I saw this PR when it was created but it has been sitting for a while because this is something I have already done and something I want to do in a very different way.

Being able to change between headphones and speakers was really the motivation for writing this library. However, in the library there's nothing specifically about that. Instead, either through the Rust API or through the command line options, the functionality is exposed such that some external software can do the output switching, or anything else it might want to do.

For example, if you wanted to write a simple PowerShell or Python script to switch devices, you can call sbz-switch -f json dump and pass the output through ConvertFrom-Json/json.loads to read in the current state, and then use sbz-switch -f json apply to perform the switch.

I use mdonoughe/sbzdeck to switch outputs, which probably isn't very interesting to you if you don't have a Stream Deck. It's much more sophisticated than this PR because it allows user configuration of which attributes should be saved and restored across switches, and tracks changes to those attributes so the correct values are restored even if the output device is switched by some other software. In my case, I have sound enhancements turned on only for speakers.

The problem with sbzdeck is that it is tied to the Stream Deck and, although it tries to account for other software, it doesn't really play nice with other software trying to do the same thing at the same time. I expect if you could somehow run multiple instances of sbzdeck they would confuse each other.

So what I wanted to do was make something like a common service where multiple applications could call into it and the service would handle the switching. That way there is only one thing which owns the sound configuration and there won't be any fighting. However, Windows doesn't really do dbus and I never settled on an appropriate alternative.

EXTREMEGABEL

comment created time in 2 days

pull request commentserenity-rs/serenity

Clean up Clippy errors

Okay that's mostly what I did. For one of them there was another similar function that had a slightly more specific errors section I adapted. I tried following some of the functions through to their official Discord API documentation and the errors aren't documented there either.

mdonoughe

comment created time in 2 days

push eventmdonoughe/serenity

Matthew Donoughe

commit sha f8a78d07e067ee9c7e7d587dc53245616b47032f

Add basic Errors sections to unstable API features

view details

Matthew Donoughe

commit sha 25133c464fe798a688060c802c7d2f50dd33dfc8

Re-add workspace clippy

view details

push time in 2 days

push eventmdonoughe/modem_status

Matthew Donoughe

commit sha 38e23e40e7abc252dfc18f0004b440540233f818

get rid of docker build stuff

view details

Matthew Donoughe

commit sha c45f78304337b9b7a68e498c6de754518b9b5f5f

retry a lot

view details

push time in 5 days

issue commentmdonoughe/modem_status

Issues with latest firmware

It's definitely a bug in the modem. It turns out sometimes sending the exact same requests to the modem multiple times with no other requests in between yields different results.

iwvelando

comment created time in 5 days

issue commentmdonoughe/modem_status

Issues with latest firmware

They changed the way you pass authentication and it looks like now you need a session ID cookie in addition to the authentication token. I got it to work, but sometimes the server incorrectly returns a 401 error even though I have authenticated. Logging in and then logging out again through the web page fixes this so one of the other things the web client does might have a side effect.

iwvelando

comment created time in 5 days

push eventmdonoughe/modem_status

Matthew Donoughe

commit sha b8e0cba6af9d7fa1ede4dc9adf98c3713fef232c

update for new modem firmware

view details

Matthew Donoughe

commit sha 9d96a7c37cedd0e4a703b160a0e78fd59484c999

update dependencies

view details

push time in 5 days

issue commentstarship/starship

Support Change Window Title for Powershell

It looks like this has been implemented in #3115.

hacklash

comment created time in 5 days

PR opened serenity-rs/serenity

Clean up Clippy errors

This fixes some of the errors preventing cargo clippy --workspace --tests (#1423).

I think this is the right thing to do? With the previous code, if the server sent something like a user ID that cannot be parsed to a u64 or did not correspond to a known user, a panic would occur. With the new code, if the servers sends something like that the code will not panic and instead options.resolved will be left as None.

The only remaining error class is missing_errors_doc. I'm not sure what to do about this. I was looking at the error handling code and for all the cases I checked there is no specific error handling so if anything goes wrong you just get Error::Http. Should I just copy and paste a generic message like "If there is an error, it will be either [Error::Http] or [Error::Json]." for those cases?

+49 -48

0 comment

1 changed file

pr created time in 16 days

push eventmdonoughe/serenity

nickelc

commit sha bade6e59c365228ba83e2bd7072c3ca62f8bdfd4

Specify MSRV for clippy and use stable toolchain for the lint job (#1521) By specifying the MSRV for clippy, It disables lints that require compiler features above the MSRV.

view details

nickelc

commit sha 46f760854da7f8f9fe4b930e0ffdf17a96d6d14a

Simplify `tracing_subscriber` initialization in the examples (#1524) The default features of `tracing_subscriber` already initialize `tracing` with `tracing_log` and the env filter when `tracing_subscriber::fmt::init()` is used.

view details

kangalioo

commit sha 02a5e1533c217c4a88d3e6a96f2a1fc21bb54a52

Add a database example using SQLite (#1495)

view details

Friz64

commit sha 5b7a23c032d2c055dd20da652516c7f1b5fa8294

Fix support for raw identifiers in `command_attr`'s macros (#1523) Closes #1454

view details

Milo

commit sha d50628ef832296bf6b4f5b11dcc41d230b39335f

Add `defer` helper methods for deferring interactions (#1517)

view details

nickelc

commit sha c3358cf6b251d9c3e6b4bfa8aba7b953b33074a9

Use `ClientBuilder::type_map_insert` in examples where it makes sense (#1525) Closes #1485

view details

nickelc

commit sha 096d1da60290fa9823ccdc72f48958aec1f7de27

Remove unused function names from the `colour!` macro (#1527) These were leftovers from the time when associated constants weren't a feature yet and we had to resort to functions. The macro has also been moved closer to its usage.

view details

Milo

commit sha 7e1a64e23fedfb28c68604beca2136469cc55c69

Apply fixes by clippy (#1526)

view details

Woong Ze Yi

commit sha 0bc3ce0c9b68d5005948c5624173963aa930a40c

Add new audit log models for `STAGE_INSTANCE`, `STICKER`, and `THREAD` (#1483)

view details

Victoria Casasampere Fernandez

commit sha 5a700f7ea40fc89ff1c5550e673dd37a3b739f06

Add channel types to application command options (#1537)

view details

Matthew Donoughe

commit sha 1e97829833bc0155cc5f2ebf760542d01acc866e

Avoid panic during value resolution

view details

push time in 16 days

push eventmdonoughe/serenity

nickelc

commit sha a03d9b87914d326e1289c8414b0b857597ba2fa8

Update `async-tungstenite` to 0.12 (#1181)

view details

Alex M. M

commit sha d03dce2033abf2784732e7ce19c790957a82bfbd

Conditionally instantiate `WebSocketConfig` to fix tokio 0.2 compilation (#1214)

view details

Alex M. M

commit sha 83970a27d22e071631091a1ba950fcd0e6570fc3

Make `RichInvite::inviter` optional and replace `InviteUser` with `User` (#1213)

view details

nickelc

commit sha bef9634fd81a1f0fd55022e554223d0cc4039928

Update `async-tungstenite` to 0.13 (#1228)

view details

Lakelezz

commit sha d28ca7000949e61343d35f404fbdb9f799adcd32

Remove `Box` indirection on `framework`. (#1240) This commit removes the `Box` around the framework, allowing to `as`-cast for the `ClientBuilder::framework_arc` method. The `as`-cast is now performed in the method itself, accepting a generic framework instead, easing the use of the API.

view details

Heinz N. Gies

commit sha 95cbd37036aa7d28b8630f01c6fdc2fc66b06d84

Add support for simd-json via a feature flag (#1237) This adds support for parsing json with the `simd-json` crate for increased performance. However, it must be enabled with the `simd-json` feature flag, as not all processors support all SIMD instructions. In addition, the minimum-supported Rust version has been increased to 1.49.

view details

kangalioo

commit sha b8fc610adfc15a3f204da068de46847d0c9539fa

Add the name of the command to the `Dispatch` error hook (#1344) Closes #876. The dispatch error hook now receives a fourth parameter with the command name.

view details

kangalioo

commit sha 9770a4a5f351d72479d954755ee738ac5a7844ee

Alter deserialisation of `Presence::user` to properly handle optional fields (#1361)

view details

Hybras

commit sha 93b51aa4b885ad501dcaf24fe7d963164dbaf383

Ensure `Activity::url` is a valid URL at a type-level (#1373)

view details

kangalioo

commit sha 615d66c4199feb2f44b9e5d0eeb200cfc99d35e6

Add support for adding attachments in message edits (#1378) This commit makes it possible to add new attachments to a message when editing it. This commit: - creates a new method `Http::edit_message_and_attachments` (that method is to `edit_message` what `send_files` is to `send_message`); - there's a lot of duplication between that new method and `Http::edit_message_and_attachments` and `Http::send_files`, but I don't know enough about serenity's http design to improve the situation; - changes calls of `Http::edit_message` to `Http::edit_message_and_attachments` where appropriate; - creates a new method `EditMessage::attachment` to add a new attachment; - adds a new field to `EditMessage` which stores new attachments (breaking change); - adds a lifetime parameter to `EditMessage` (breaking change); - moves the `AttachmentType` serialization into an HTTP form part into a function to avoid code duplication.

view details

Derrick Lee

commit sha ed2b05f619913f7d5e46661d1c64c6dd83c8d68c

Make `Embed::colour` an `Option` (#1392) Prevents changing embed colours to black when editing a message. When an embed colour isn't provided when creating a message, the API returns messages with colour as undefined for default colour. The colour field has the `#[serde(default)]` attribute, which changes that into a `0` instead.

view details

tylerd008

commit sha fd258e0387f6b82bce3525899d93dcef9f002398

Implement optional pagination for `Http::get_guilds` (#1403)

view details

Alex M. M

commit sha 64acac31e7e2da14115a53c6104e86629ea9df23

Change return signatures of help commands to return `Result`s (#1412) This changes the return type of the default help commands from `Option` to `Result` to allow the caller to decide how they want to present the error that occurred when sending the response.

view details

Derrick Lee

commit sha eb4bf237f92ff8a94a338149a6d419eef3ad7a48

Correctly cache guild categories on add/delete/update (#1405) This deserializes `Guild` channels from `GuildCreate` as the `Channel` enum instead of `GuildChannel`. This also prevents the merging of guild channels and categories in `Cache::channels` when they should be separate. This also correctly updates the guild channels in the cache (e.g. when using `Message::guild(ctx)`) instead of *only* `Cache::categories`. Additionally, this is a breaking change as `Guild::channels` has been changed from `HashMap<ChannelId, GuildChannel>` to `HashMap<ChannelId, Channel>`.

view details

rasm47

commit sha e7f58dc5280644492347bafe0804ef288f3c742c

Remove `Shard::is_shutdown` (#1414) This commit removes the `Shard::shutdown` field and the `Shard::is_shutdown` method. The method always returned false as `Shard::shutdown` was never modified anywhere, which left the method useless.

view details

Alex M. M

commit sha eb09bc399f5f471cf7b22385160ca8dc2a4ae872

Configure project to be always compiled with native CPU support (#1416) This adds a Cargo configuration file that defines flags for every invocation of `rustc` on Serenity and its dependencies. This removes the need to explicitly specify those flags when building the library, especially when testing `simd-json` code. Fixes #1415

view details

Derrick Lee

commit sha 7eb0896878186273dd4b9429bbc4abef8115581c

Integrate attachments into the `Request` system (#1408) This bakes multipart forms into `Request`s when making HTTP calls to Discord's API for sending attachments. As a result, this standardises the behaviour for endpoints that allow you to send attachments to use the same ratelimiting code as every other endpoint, rather than those endpoints performing raw requests and bypassing the ratelimiter. Fixes #1269

view details

kangalioo

commit sha b757a3da5083c462d78fc28e61afcb22945f9dee

Add audit log reason support to most HTTP endpoints (#1354)

view details

Alex M. M

commit sha 302135125b07237965a02e32b2b054a7b5b0e07f

Be consistent with `simd_json` feature-gating

view details

drklee3

commit sha 18c72cfa9933b1aadf77b860066166fe46ee62ae

Add support for sticker packs, guild stickers, and sticker routes (#1395) This adds the following features: * Add/modify/delete guild stickers * Fetch sticker information * Fetch list of all nitro stickers * Sending stickers in message (up to 3) Breaking change as sticker module is moved out of the channel module and to the root model module. This also adds an additional `mime` and `mime_guess` dependencies as Discord requires the mime type on the file part when creating a sticker via multipart/form-data requests otherwise it will return a 500 Internal Server Error. This dependency is also used by `reqwest` internally.

view details

push time in 16 days

create barnchmdonoughe/serenity

branch : clippy

created branch time in 16 days

fork mdonoughe/serenity

A Rust library for the Discord API.

https://discord.gg/serenity-rs

fork in 16 days

issue commentmdonoughe/streamdeck-rs

Simple example missing

I use it for this plugin: https://github.com/mdonoughe/sbzdeck/blob/master/plugin/src/main.rs

You want to make something like this:

#[tokio::main(max_threads=1)]
async fn main() {
    let params = &RegistrationParams::from_args(env::args()).unwrap();
    let (mut sink, mut stream) = StreamDeckSocket::<MyGlobalSettings, MyActionSettings, FromInspector, ToInspector>::connect(
        params.port,
        params.event.to_string(),
        params.uuid.to_string(),
    ).await.expect("connection failed").split();
}

Then you can use the usual async stream stuff to receive events from the Stream Deck software via stream using the Message type and send events to the Stream Deck software via sink using the MessageOut type. If you want to do something simple you can make a loop that reads from sink and only reacts to that, but in my case I needed to initiate actions from the plugin so I needed something more complicated.

For any of the type parameters to StreamDeckSocket if you aren't going to use them you can just define a struct Empty:

#[derive(Debug, Deserialize, Serialize)]
pub struct Empty {}

You'll still need to set up the plugin manifest. This library only handles opening the connection and serialization/deserialization of messages.

FibreFoX

comment created time in 21 days

created tagmdonoughe/porkbun-webhook

tagv0.1.0

A cert-manager sample repository for creating an ACME DNS01 solver webhook

created time in a month

delete branch mdonoughe/porkbun-webhook

delete branch : apiVersion

delete time in a month

push eventmdonoughe/webhook-example

Matthew Donoughe

commit sha 40d1ab79961b98a5b7931806b1b63fce612f2fe1

initial commit

view details

push time in a month

fork mdonoughe/webhook-example

A cert-manager sample repository for creating an ACME DNS01 solver webhook

fork in a month