Shadow

joined 2 years ago
MODERATOR OF
[–] Shadow 13 points 2 weeks ago

Hey now, thats not how we communicate on this instance.

[–] Shadow 159 points 2 weeks ago (15 children)

Tourism makes up 11% of El Salvador's GDP.

Sounds like that should change too.

[–] Shadow 2 points 2 weeks ago

Right, I misread the subject.

Paraquat causes Parkinson's. Glyphosate most likely causes diseases too.

[–] Shadow 16 points 2 weeks ago

The iss speed is relative to earth. The earth speed is probably relative to the sun. There's no common frame of reference between the two numbers.

[–] Shadow 4 points 2 weeks ago (1 children)

Yes exactly. It might pull something like 5 - 20 watts if I had to guess.

[–] Shadow 6 points 2 weeks ago (3 children)

The UPS only draws significant additional power when charging up. Otherwise it would have a negligible power draw. Just add up your devices.

[–] Shadow 4 points 2 weeks ago

Kinda surprised wolfram alpha hasn't done more in the ai space

[–] Shadow 4 points 2 weeks ago (2 children)

Memory connected via the pci bus to the CPU, would be too slow for application use like that.

Apple had to use soldered in ram for their unified memory because the length of the traces on the mobo news to be so tightly controlled. Pci is way too slow comparatively.

[–] Shadow 18 points 2 weeks ago (5 children)

Modern flash is already faster than your pci bus, and it's cheaper than dram. Using ram doesn't add anything.

It uses to be a thing before modern flash chips, you'd have battery backed dram pci-e cards.

[–] Shadow 54 points 2 weeks ago

I don't expect users to notice much. This mostly just helps SJW avoid duplication of effort that we've already done, things like setting up proper banking / donation systems, etc. They're also welcome to leave at any time, if they feel we're no longer going in the same direction.

We're not merging sites / stacks or anything like that but we will likely collaborate more, simply to save each other time and energy. Since we are all just volunteers, that's really helpful.

[–] Shadow 54 points 2 weeks ago (3 children)

Yep, they're hosted on the East coast

13
submitted 1 month ago* (last edited 1 month ago) by Shadow to c/[email protected]
 

cross-posted from: https://lemmy.ca/post/40761824

Sorry everyone I know how much you love the attention she gives you, but I've implemented some quick and dirty filtering for private messaging.

We now have the ability to automatically mark PM's as deleted or read, depending on content inside of them. If we accidentally filter something you legitimately wanted (ie, not Nicole) please let me know.

If any other instances would like to implement this, here's the code. Note that you'll need to set your hostname at the top here for some reason I haven't exactly identified.

SET lemmy.protocol_and_hostname = 'https://lemmy.ca/';

CREATE TABLE private_message_filters (
    id SERIAL PRIMARY KEY,
    phrase TEXT NOT NULL,
    behavior VARCHAR(10) NOT NULL CHECK (behavior IN ('delete', 'mark_read'))
);

CREATE OR REPLACE FUNCTION filter_private_messages()
RETURNS trigger AS $$
DECLARE
    banned_phrase_record private_message_filters%ROWTYPE;
BEGIN
    FOR banned_phrase_record IN 
        SELECT * FROM private_message_filters
    LOOP
        IF LOWER(TRIM(NEW.content)) ILIKE '%' || LOWER(TRIM(banned_phrase_record.phrase)) || '%' THEN
            IF banned_phrase_record.behavior = 'delete' THEN
                NEW.deleted := true;
                RETURN NEW;
            ELSIF banned_phrase_record.behavior = 'mark_read' THEN
                NEW.read := true;
                RETURN NEW;
            END IF;
        END IF;
    END LOOP;
    RETURN NEW;
END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER trg_filter_private_messages
AFTER INSERT ON private_message
FOR EACH ROW
EXECUTE FUNCTION filter_private_messages();

To add filter words:

insert into private_message_filters (behavior, phrase) values ('delete', 'spamtestdelete');
insert into private_message_filters (behavior, phrase) values ('mark_read', 'spamtestread');

If you want to quickly disable / enable filtering while testing:

ALTER TABLE private_message DISABLE TRIGGER trg_filter_private_messages;
ALTER TABLE private_message ENABLE TRIGGER trg_filter_private_messages;

I'll leave it up to you to figure out what phrases to filter on. MAKE SURE YOU TEST. If there's an error, private messaging could break completely. You should not get an error message from the UI while sending a message with a banned word.

Edit: I like flamingos-cant's solution here better: https://lemmy.ca/post/40761824/15209462

166
submitted 1 month ago* (last edited 1 month ago) by Shadow to c/main
 

Sorry everyone I know how much you love the attention she gives you, but I've implemented some quick and dirty filtering for private messaging.

We now have the ability to automatically mark PM's as deleted or read, depending on content inside of them. If we accidentally filter something you legitimately wanted (ie, not Nicole) please let me know.

If any other instances would like to implement this, here's the code. Note that you'll need to set your hostname at the top here for some reason I haven't exactly identified.

SET lemmy.protocol_and_hostname = 'https://lemmy.ca/';

CREATE TABLE private_message_filters (
    id SERIAL PRIMARY KEY,
    phrase TEXT NOT NULL,
    behavior VARCHAR(10) NOT NULL CHECK (behavior IN ('delete', 'mark_read'))
);

CREATE OR REPLACE FUNCTION filter_private_messages()
RETURNS trigger AS $$
DECLARE
    banned_phrase_record private_message_filters%ROWTYPE;
BEGIN
    FOR banned_phrase_record IN 
        SELECT * FROM private_message_filters
    LOOP
        IF LOWER(TRIM(NEW.content)) ILIKE '%' || LOWER(TRIM(banned_phrase_record.phrase)) || '%' THEN
            IF banned_phrase_record.behavior = 'delete' THEN
                NEW.deleted := true;
                RETURN NEW;
            ELSIF banned_phrase_record.behavior = 'mark_read' THEN
                NEW.read := true;
                RETURN NEW;
            END IF;
        END IF;
    END LOOP;
    RETURN NEW;
END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER trg_filter_private_messages
AFTER INSERT ON private_message
FOR EACH ROW
EXECUTE FUNCTION filter_private_messages();

To add filter words:

insert into private_message_filters (behavior, phrase) values ('delete', 'spamtestdelete');
insert into private_message_filters (behavior, phrase) values ('mark_read', 'spamtestread');

If you want to quickly disable / enable filtering while testing:

ALTER TABLE private_message DISABLE TRIGGER trg_filter_private_messages;
ALTER TABLE private_message ENABLE TRIGGER trg_filter_private_messages;

I'll leave it up to you to figure out what phrases to filter on. MAKE SURE YOU TEST. If there's an error, private messaging could break completely. You should not get an error message from the UI while sending a message with a banned word.

 

You just end up creating an desolate community full of noise, since the op will never see the replies.

It hurts lemmy users who don't realize this and wonder why there's no engagement.

For example: https://lemmy.ml/comment/17284093

Blindly copying posts from reddit is not the way to grow a healthy lemmy community.

135
submitted 1 month ago by Shadow to c/main
 

Sorry for the downtime! Unfortunately our secondary firewall took over for some reason, and haproxy failed to properly come up.

I'll be scheduling a maintenance window in the next few days to do some further digging, so I can make sure this is fully resolved.

19
Locust Plague of 1874 (en.m.wikipedia.org)
submitted 1 month ago by Shadow to c/[email protected]
44
We Are Canadian (www.youtube.com)
submitted 1 month ago by Shadow to c/canada
15
submitted 2 months ago by Shadow to c/pixelfed
 

With some hacking at the database and APIs, I've put together a python script that allows backfilling of posts. I've now pulled in the most recent 50 posts of anyone that one of our users is following.

You may now bask in cats. https://pixelfed.ca/i/web/profile/797991200484212751

Hopefully that'll help it feel a little less empty!

12
submitted 2 months ago by Shadow to c/pixeld
58
submitted 2 months ago by Shadow to c/main
 

Sorry about the brief downtime there!

Wasn't related to the new users or high load, but was a combination of two problems:

  1. Our fw02 took over for some reason TBD
  2. Opnsense isn't keeping haproxy configs in sync and fw02 had a broken config

Still digging into the root cause, but shouldn't be any more issues =)

view more: ‹ prev next ›