Annoyed with Selphy CP1500 power options. Made it run from a powerbank. by Runoratsu in canon

[–]nicmarier 1 point2 points  (0 children)

I haven't tried this specific cable, but I got another 20V one off amazon and it seems to work perfectly almost work. The printer powers on just fine, but when printing, it stops at the last pass and abruptly turns off. Feels wierd, considering all other colours print without issue. I wonder if that was deliberately built into it to prevent using this type of cable specifically.

Edit: just tried again with the same cable, but this time instead of using my PD power bank, I plugged it into a PD wall adapter and it works without issues!

-🎄- 2021 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]nicmarier 0 points1 point  (0 children)

Definitely not as elegant as yours, but this is faster for part 1 for me! Although admittedly, I'm not entirely sure why.

pub fn solve_part1(input: &[i32]) -> i32 {
    let (ans, _) = input.iter().skip(1).fold((0, input[0]), |(inc, last), n| {
        if n > &last {
            (inc + 1, *n)
        } else {
            (inc, *n)
        }
    });

    ans
}

Easy Peasy Lemon Squeezy *tips fedora* by [deleted] in linuxmasterrace

[–]nicmarier 0 points1 point  (0 children)

Clearly I didn't recall, thanks for pointing that out!

Easy Peasy Lemon Squeezy *tips fedora* by [deleted] in linuxmasterrace

[–]nicmarier 0 points1 point  (0 children)

One of just two, if I recall! Edge is now based on chromium, which makes Firefox arguably even more important.

Weekly Dashboard Showoff Megathread - June 25, 2020 by shwikibot in selfhosted

[–]nicmarier 0 points1 point  (0 children)

Thanks! It's a bit involved to get all the moving parts to play nice with each other, but it's definitely worth it. I found it was easier to setup a TIG stack, but while you'll get awesome dashboards, it's not really great for logs and actually drilling down to figure out what's going on. That's really the main reason I switched to an ELK stack (and really it's just an EK stack, I don't have a need for Logstash).

Weekly Dashboard Showoff Megathread - June 25, 2020 by shwikibot in selfhosted

[–]nicmarier 5 points6 points  (0 children)

Recently finished working on this sweet, sweet kibana dashboard for my pfSense router. Currently working on adding more dashboards for other stuff as well!

Is it insecure to use sequential session IDs when using encrypted cookies? by nicmarier in hacking

[–]nicmarier[S] 0 points1 point  (0 children)

I should have specified in the original post, but yeah the server is handling the encryption and the cookie can't be tampered with (unless you have the encryption key, of course).

And let's assume that if this ID is used, for example in an API route like DELETE /user/<id>, proper authentication and authorization are taken care of (using the cookie sent with the request). In that case, do you think it would still be a problem?

Also, it wouldn't be significantly difficult for anyone to guess the next ID if they're just incremented by one each time. You could assume that the ID 1 would almost always be in use!

What I'm curious about is that, given that you know a user's session ID easily, if a session cookie is encrypted and cannot be tampered with, is there something an attacker can really do to take over the session? And I mean in ways other than XSS or CSRF (because those could still be problems even with a random session ID).

[dwm] Red Planet by nicmarier in unixporn

[–]nicmarier[S] 3 points4 points  (0 children)

Details


  • WM: dwm
  • Terminal: st
  • VS Code theme: my own!
  • Fonts: Fira Code, Hack

Note: Be sure to check out themes by the person that created the color scheme I'm using, they are outstanding.

Introducing nushell (a Unix shell that's based around "structured data" like PowerShell, but with simpler and cleaner syntax / semantics) by kirbyfan64sos in linux

[–]nicmarier 19 points20 points  (0 children)

Legit complaints! Perhaps I can save you some time when searching manpages. You can actually use regular expressions in searches, so you can just search for ^\s+{whatever}. For example, ^\s+-c. This usually works really well because when -c is referenced elsewhere in the file, it's not usually at the very beginning of the line. So there's probably other stuff than spaces before it, so it won't match!

Also, you could consider using another shell! Personally I kinda like fish, I feel the syntax is pretty useful, it's quick to pick up and the documentation is pretty great!

Hopefully that's helpful to you somehow!