Help Bites


  • Java Dev

    @error Send an email to yourself?


  • Considered Harmful

    @PleegWat said in Help Bites:

    @error Send an email to yourself?

    a.) Every time I want to preview it? I will end up sending an email every 3 seconds for several hours.
    b.) Scratch that, I will end up sending an email to my Outlook, an email to my Gmail, an email to my Horde/Roundcube/Squirrelmail/Thunderbird.... Once every 3 seconds for hours...


  • Java Dev

    @error The webmail ones would probably just be equivalent to browser rendering? Though they may filter some tags.


  • Considered Harmful

    @PleegWat said in Help Bites:

    The webmail ones would probably just be equivalent to browser rendering? Though they may filter some tags.

    dafd46c4-0468-41a7-a6fd-d89b8de50f68-image.png



  • How can I group rows based on a sliding timestamp window? Basically, I want all partitions to contain rows with at least one other row in the partition being less than a minute away.

    Edit: I can do it like this:

    How can I do this without the recursive CTE?



  • @error said in Help Bites:

    I know the lowest common denominator is like... HTML 3.plain text


  • Considered Harmful

    @ben_lubar said in Help Bites:

    How can I group rows based on a sliding timestamp window? Basically, I want all partitions to contain rows with at least one other row in the partition being less than a minute away.

    It scares me that the answer to this question is probably going to directly impact this forum.



  • @error said in Help Bites:

    @ben_lubar said in Help Bites:

    How can I group rows based on a sliding timestamp window? Basically, I want all partitions to contain rows with at least one other row in the partition being less than a minute away.

    It scares me that the answer to this question is probably going to directly impact this forum.

    nope, it's for https://ravenvale.lubar.me


  • Considered Harmful

    @dcon said in Help Bites:

    plain text

    PHB won't like that at all.


  • Discourse touched me in a no-no place

    @error said in Help Bites:

    Is there a way to preview how an email template will render over the bajillion or so different email clients out there?

    etc


  • Considered Harmful

    @loopback0 said in Help Bites:

    @error said in Help Bites:

    Is there a way to preview how an email template will render over the bajillion or so different email clients out there?
    

    etc

    da9de3b5-9813-444c-9cd5-0922f24ef760-image.png

    957b3993-c3a3-49e9-b57f-6249df8ce294-image.png

    I thought it was too good to be true.


  • Discourse touched me in a no-no place

    @error Oof.

    I think EoA is cheaper but it's been a while since I used it.

    There are others which may be cheaper or free but I've not used them.


  • Considered Harmful

    Why does all software have to be a service these days?

    I'd shell out $200 out of my own pocket just to save myself the pain, if it was a perpetual license deal.


  • Considered Harmful

    I guess I'll use the old fashioned approach: test with what the boss is using until it looks good, then tweak the others as an afterthought.



  • @error Just render it to an SVG, it'll be fine


  • Discourse touched me in a no-no place

    @error said in Help Bites:

    Why does all software have to be a service these days?

    I'd shell out $200 out of my own pocket just to save myself the pain, if it was a perpetual license deal.

    EoA has the various devices (virtually in most cases, I assume) to render the emails on. That doesn't really work other than a service.



  • @error said in Help Bites:

    Is there a way to preview how an email template will render over the bajillion or so different email clients out there?

    I know the lowest common denominator is like... HTML 3.

    make sure you also include plain text content.

    the number of times i've gotten an HTML spam email from someone with no plain text content and me trying to read it on pine....

    I mean at least i know it's not a legit email, but sometimes it's nice to at least know what you're trying to sell me.



  • @Vixen said in Help Bites:

    me trying to read it on pine/bin/mail....

    FTFM. Yeah, I actually used to do that.



  • @HardwareGeek said in Help Bites:

    @Vixen said in Help Bites:

    me trying to read it on pine/bin/mail....

    FTFM. Yeah, I actually used to do that.

    these days i tend to use mailx for checking email from the command line.... because the only time i still do that is when i'm looking fro why my cron job is failing..... and i can't be assed yet to set up mail forwarding to my gsuite address.


  • Java Dev

    @Vixen Last I did that (just add MAILTO=perverted_vixen@gmail.com to the crontab above the job) I disabled it a week later because I failed to appreciate how much volume a mail per minute over the entire weekend is.



  • @PleegWat said in Help Bites:

    just add MAILTO=perverted_vixen@gmail.com to the crontab above the job

    I could do that..... but that would just spam someone else's mailbo....oh. you meant for that email address to be a placeholder didn't you?

    of course you did.... right.

    little slow on the uptake here today it seems.


  • Java Dev

    @Vixen said in Help Bites:

    @PleegWat said in Help Bites:

    just add MAILTO=perverted_vixen@gmail.com to the crontab above the job

    I could do that..... but that would just spam someone else's mailbo....oh. you meant for that email address to be a placeholder didn't you?

    of course you did.... right.

    little slow on the uptake here today it seems.

    Well I wouldn't put your own email address in a post like that. That would be breach of privacy.


  • Banned

    @ben_lubar said in Help Bites:

    How can I group rows based on a sliding timestamp window? Basically, I want all partitions to contain rows with at least one other row in the partition being less than a minute away.

    You probably want a stored procedure for that. Manually iterate over input rows, and output a row when you notice >1min time change.



  • @Gąska said in Help Bites:

    @ben_lubar said in Help Bites:

    How can I group rows based on a sliding timestamp window? Basically, I want all partitions to contain rows with at least one other row in the partition being less than a minute away.
    

    You probably want a stored procedure for that. Manually iterate over input rows, and output a row when you notice >1min time change.

    Here's what I ended up doing: https://git.lubar.me/lubar-local/ravenvale/src/commit/6dbc17dfeadcc3f05c8ee93a6351d32b75886386/logkeeper.go#L25-L95

    The LAG function is a life-saver.


  • And then the murders began.

    Mail.com recently reduced their attachment size limit down to 30 MB, which is too small for my needs. Any suggestions for an email provider - preferably free, but I might take paid at this point - allowing 50 MB attachments?



  • @Unperverted-Vixen said in Help Bites:

    Mail.com recently reduced their attachment size limit down to 30 MB, which is too small for my needs. Any suggestions for an email provider - preferably free, but I might take paid at this point - allowing 50 MB attachments?

    why do you need attachments that big? like that's really big for attachments!

    why not use a cloud storage provider (dropbox, box, google drive, onedrive, amazonS3, etc. and email a link to the file instead? because even if you can send a 50MB attachment, there are a lot of mail providers and intermediate mail processors that will reject a 100MB email (the size is double because of how email attachments are encoded)


  • And then the murders began.

    @Vixen said in Help Bites:

    why do you need attachments that big? like that's really big for attachments!

    Emailing large books to the Kindle Personal Documents service.

    (They also have a desktop application, but it destroys the metadata in the book. Maybe I should peek at its network traffic and try to create my own version thereof...)

    why not use a cloud storage provider (dropbox, box, google drive, onedrive, amazonS3, etc. and email a link to the file instead?

    Because Amazon's email processor doesn't know how to follow those links. 😛

    because even if you can send a 50MB attachment, there are a lot of mail providers and intermediate mail processors that will reject a 100MB email (the size is double because of how email attachments are encoded)

    Either Kindle files encode really well, or their system only checks the size limit after decoding. I've sent 48 MB attachments successfully in the past.



  • @Unperverted-Vixen said in Help Bites:

    @Vixen said in Help Bites:

    why do you need attachments that big? like that's really big for attachments!

    Emailing large books to the Kindle Personal Documents service.

    (They also have a desktop application, but it destroys the metadata in the book. Maybe I should peek at its network traffic and try to create my own version thereof...)

    why not use a cloud storage provider (dropbox, box, google drive, onedrive, amazonS3, etc. and email a link to the file instead?

    Because Amazon's email processor doesn't know how to follow those links. 😛

    because even if you can send a 50MB attachment, there are a lot of mail providers and intermediate mail processors that will reject a 100MB email (the size is double because of how email attachments are encoded)

    Either Kindle files encode really well, or their system only checks the size limit after decoding. I've sent 48 MB attachments successfully in the past.

    ah.... in that case.......

    uhh....... hmm...... -googles things- lets see here...... -scratches the GOOD SPOTTM, that one right behind the ears- hmmmmmmmm........

    how do you feel about setting up your own personal SENDMAIL server?



  • @Vixen said in Help Bites:

    (the size is double because of how email attachments are encoded)

    Isn't it base64, which is more like 1-and-a-third-ble?



  • @hungrier said in Help Bites:

    @Vixen said in Help Bites:

    (the size is double because of how email attachments are encoded)

    Isn't it base64, which is more like 1-and-a-third-ble?

    /shrug according to the quick and entirely unverified googling i did it's a 1:2 encoding....

    but then the internet has been known to be wrong before.......



  • Trying to set up the Tensorflow docker container in a virtual machine. Confused.


    At first, I did the naive thing and just ran Vagrant's docker provisioner. That worked enough to launch the container. But it seemed like I'd have to be sitting at the hypervisor to actually connect to the web server the docker container exposes...

    OK, so I added another network interface, and set up a network bridge against it, and made sure Docker used the new bridge instead of docker0.

    COOL this actually kind of works! (Though I haven't actually tried connecting to the Jupyter notebook yet...)

    Now, how do I set the stupid mac address on Docker's veth interface so the container can get a "static" DHCP assigned address?

    docker run --mac-address=fa:ce:de:Ad:bE:ef tensorflow/tensorflow isn't working.

    Maybe I'm just doing this the stupid way. How do I get my docker container visible on the LAN for all my other hosts to see? (Doubly appropriate, since I'm going to set up a Unifi SDN container next...)



  • @Captain said in Help Bites:

    Maybe I'm just doing this the stupid way. How do I get my docker container visible on the LAN for all my other hosts to see?

    do you know what ports you need open?

    becuase if so what I do is this:

    1. add an IP to the NIC on my host machine.

      • I use 192.168.0.0/20 as my network and have DNS hand out IPs in the range 192.168.3.1 to 192.168.3.254 so i use 192.168.4.* for statically assigned IPs In this case I added 192.168.4.3 for my plex server
    2. set up a docker compose config. Not because i need docker compose but because it simplifies updating the containers. instead of having to tear them down and remember the exact command to pull a fresh image and restart them i just docker-compose pull; docker-compose up -d
      /home/docker/compose/plex/docker-compose.yml

    version: '3.7'
    services:
        plex:
            image: 'plexinc/pms-docker'
            hostname: plex
            container_name: plex
            ports:
              - "192.168.4.3:80:32400"
              - "192.168.4.3:32400:32400"
              - "192.168.4.3:3005:3005"
              - "192.168.4.3:8324:8324"
              - "192.168.4.3:32469:32469"
              - "192.168.4.3:1900:1900"
              - "192.168.4.3:32410:32410"
              - "192.168.4.3:32412:32412"
              - "192.168.4.3:32413:32413"
              - "192.168.4.3:32414:32414"
            environment:
                TZ: "America/New_York"
                ADVERTISE_IP: "http://192.168.4.3:32400"
                PLEX_UID: 1000
                PLEX_GID: 1000
            volumes:
                - '/home/plex/config:/config'
                - '/home/plex/transcode:/transcode'
                - '/mnt/video:/data'
            restart: always
    

    you could turn that docker-compose.yml into the equivalent plain docker command but..... eeeh. i'm not too worried about that. also I forgot i had my transcode and config volumes physical directories on disc. i should move those to proper docker volumes..... eventually......

    there's probably a more dockerish way to set this sort of thing up.... probably using kubernetes these days.... but this works for me!



  • @Vixen Hmm going to have to think about this some.

    I'll make a new VMconfiguration to try this out with.

    It doesn't help that I'm working remotely (here -> hypervisor -> vm -> docker container) and can't get at the router configuration from here to test Jupyter.

    But one weird thing I found out:

    1. With a pretty clean docker run command, stupid Jupyter only listens on ipv6.

    And I also found out about this dumb ass docker/udev race condition which is what was breaking my bridge MAC address assignment:

    I also think I was over-thinking this maybe, since now telneting onto my port on my vm's IP seems to do something before the connection gets closed. So maybe I'll try a simpler configuration too.



  • status: realized i was using the wrong and stupid docker image.


  • Considered Harmful

    @PleegWat said in Help Bites:

    Last I did that (just add MAILTO=perverted_vixen@gmail.com to the crontab above the job) I

    Yeah, the last time I added her email to a crontab, she made me her slave for a week.

    Edit: :hanzo: I guess


  • ♿ (Parody)

    @anonymous234 said in Help Bites:

    Does anyone have multiple email accounts for security?

    I made my boomzilla account for this site when :doing_it_wrong: showed up as an admin.



  • I decided to try and create an interpreter for the PIC language using C90 and the lemon LALR(1) parser generator. (If I succeed, it may help the Fossil project. If I don't, I still have fun and tick "LALR(1) grammars" in my CV.)

    The thing I am having most trouble with is one specific way to position objects in PIC. The usual syntax is {primitive} at {position}, with {position} being things like Here + (1,2). Another way of specifying positions is to refer to a point some fraction of the way between two other points, e.g. {expr} [of the way] between {position} and {position}. This being a bit wordy, there is also a shortcut: {expr} < {position} , {position} > (i.e. the positions are separated by a literal comma , and enclosed by literal angle brackets <>).

    The problem is that < is also a binary operation that could be applied to two expressions and that some kinds of expressions can start with a place name, so with the grammar I have right now, when parser sees 2 / 3 < A, B >, it interprets 2 / 3 < A as a potential expression, then chokes on a comma.

    Could someone give me a hand at proper conflict resolution in LALR(1) grammars? I have already resolved some conflicts so that the grammar would be generated cleanly, but I am clearly not doing it right.



  • @aitap If you use a LALR parser, put your default/preferred case in last (in your parser definition) and that's the alternative the parser will pick.

    You just need to make a parser definition for an atom that represents the "ambiguous" fragment, do some lookaheads to see which branch it needs to take, and let the parser carry on.

    Your grammar looks reasonable, but I didn't build out a tree of valid syntax or anything...


  • Discourse touched me in a no-no place

    @aitap said in Help Bites:

    Could someone give me a hand at proper conflict resolution in LALR(1) grammars?

    I don't use parsers very often, but the advice I got many years ago is to work on the grammar carefully to ensure that you have no conflicts, neither shift/reduce (which are bad) or reduce/reduce (which are terrible and evil). Instead, if I remember right, those ambiguous cases have to be written such that the parser can avoid making a choice as to what it has got until the point where it is entirely unambiguous. The guy who gave me the advice was a senior lecturer whose research career had been in parsing, an area mostly mined out now (except for the problems to do with error correcting parsing, which is about a zillion times harder than standard parsing because people and computers parse things differently) but which was still being finalized at that time.



  • After my previous adventures getting the environment setup for client/new project I've now got a mostly working Linux VM. However, apparently the browser is a bit deficient:

    (insert a screenshot of a twitter video that says "We cannot play the video in this browser."; apparently I can't paste an image from the host to guest, even though I did manage to get bidirectional text pasting to work)

    So, is there some kind of magic I can do to enable Twitter videos in the default Firefox in Ubuntu 18.04 LTS?



  • @hungrier Update: Enabling it turned out to be very easy (install ffmpeg that I thought I already had; turn on DRM protected media in Firefox settings) but the twitter video will only play one second at a time then stop.


  • Notification Spam Recipient

    @hungrier said in Help Bites:

    only play one second at a time then stop.

    Are you clicking? Try pressing the space bar instead.


  • Banned

    @hungrier What do you mean by "stop", exactly? Pause? Pretend to have ended? Freeze in place and ignore any input? Do you scroll page up or down while this happens?



  • @Tsaukpaetra said in Help Bites:

    @hungrier said in Help Bites:

    only play one second at a time then stop.

    Are you clicking? Try pressing the space bar instead.

    I was clicking. But strangely enough, I tried it just now and the video played normally. :wtf_owl:

    @Gąska said in Help Bites:

    @hungrier What do you mean by "stop", exactly? Pause? Pretend to have ended? Freeze in place and ignore any input? Do you scroll page up or down while this happens?

    It would pause the video, and the only way to get it to play would be to drag the timeline, at which point it would play for a second and stop again


  • Banned

    @hungrier I'd say corrupted cache. Next time it happens, try hard refresh.



  • What's the best HTTP API test software? It can't possibly be Postman


  • Notification Spam Recipient

    @hungrier said in Help Bites:

    Postman

    It has suited my limited needs to do far.


  • Discourse touched me in a no-no place

    @hungrier said in Help Bites:

    What's the best HTTP API test software? It can't possibly be Postman

    I use SoapUI or good ol' curl depending on what I need to do.



  • @Tsaukpaetra I remember running into weird cookie issues (IIRC they got cached in some mysterious Electron location and couldn't be cleared out) last time I tried using it for anything beyond very basic requests, but maybe it's gotten better since then. I guess I'll give it another shot

    ... starting next week



  • @loopback0 I've used SoapUI ages ago (oddly enough, for SOAP requests 🤢) and it was kind of cumbersome but overall not too bad. But is it Windows only? For my current purpose I need something that'll work in Linux

    Curl may work for what I need but I think it would be extremely fiddly to work with token authentication redirects and json payloads


Log in to reply