tko

joined 1 year ago
MODERATOR OF
[–] [email protected] 2 points 3 days ago

It was not a prediction of victory... it was a 71% chance of winning the electoral college. Said another way, they gave her a 29% chance of losing.

https://projects.fivethirtyeight.com/2016-election-forecast/

[–] [email protected] 2 points 4 days ago

ahhhh yes, that makes perfect sense... thank you for pointing that out! Especially since I'm not good enough with vi to know how to bulk delete the first character in specific lines, I had to manually arrow and delete.

[–] [email protected] 2 points 4 days ago* (last edited 4 days ago) (2 children)

I successfully migrated postgres 15 to 16. I followed the general idea of the guide you posted, but I found it a little easier to do a slightly different process. Here's what I did:

  1. docker-compose down for the lemmy instance

~~2. edit the docker-compose.yml file and comment out all of the services except postgres. In addition, add a new volume to the postgres service that looks something like this: - ./volumes/miscfiles:/miscfiles~~

  1. edit the docker-compose.yml file and add a new volume to the postgres service that looks something like this: - ./volumes/miscfiles:/miscfiles
  2. docker-compose up -d postgres (this starts just the postgres service from the docker compose file)
  3. docker exec -it [container name] pg_dumpall -U [username] -f /miscfiles/pgdumpall20240628 (I think this will work, but it's not exactly what I did... rather, I ran docker exec -it [container name] bash, and then ran pgdumpall -U [username] -f /miscfiles/pgdumpall20240628. The end result is a dumpall file saved in the ./volumes/miscfiles directory on the host machine)
  4. docker-compose down
  5. mv ./volumes/postgres ./volumes/postgresBAK20240628 (move your existing postgres data to a new directory for backup purposes)
  6. mkdir ./volumes/postgres (re-create an empty postgres data folder. make sure the owner and permissions match the postgresBAK20240628 directory)
  7. edit the docker-compose.yml and update the postgres image tag to the new version
  8. docker-compose up -d postgres (you'll now have a brand new postgres container running with the new version)
  9. docker-exec -it [container name] psql -U [username] -f /miscfiles/pgdumpall20240628 (again, I think this will work, but I bashed in and ran the command from within the container. This also allows you to watch the file execute all of the commands... I don't know if it will do that if you run it from the host.)
  10. docker-compose down

~~12. edit the docker-compose.yml and un-comment all of the other services that you commented out in step 2~~

  1. docker-compose up -d

Hopefully that helps anyone that might need it!

edited to reflect the comment below

[–] [email protected] 6 points 4 days ago

I agree... I was simply clarifying that Nate Silver did NOT predict that Hillary would win (nor is he predicting that Trump will win this election), which is a common misunderstanding about probability. For these types of models to be meaningful to the public, there needs to be literacy on what is meant by the percentages given. Really, I'm just reinforcing rodneylives' point from another angle!

[–] [email protected] 11 points 4 days ago (3 children)

I don't remember him predicting that she would win. His model (https://projects.fivethirtyeight.com/2016-election-forecast/) gave her a 71% chance of winning. 71% is a long way from 100%, and the result of that election definitely fit within the model.

That said, you are absolutely correct... we need to keep shining a light on the realities of each of these candidates, because in the light of day Biden is a much better choice than Trump.

[–] [email protected] 1 points 5 days ago

Thank you, that's super helpful!

 

The release notes for 0.19.4 mention that this version requires an upgrade to both pictrs and postgres, but there isn't any information about what versions of those are supported. Is there someplace else I should be looking for this information? Or should I just YOLO with the latest version of each?

[–] [email protected] 3 points 1 week ago

Stop j'terrorizing me!

[–] [email protected] 2 points 1 month ago

Depending on what exactly you're looking for, Photostructure might be a good option. It's got a great UI for viewing photos, and it's meant to play well with other Metadata software.

[–] [email protected] 2 points 1 month ago

I don't think I'd call them assholes... more just shortsighted about the realities of selling an album, specifically in how you refer to the album both in speech and in writing.

[–] [email protected] 1 points 2 months ago

I gotta admit, I don't usually follow the draft since I don't know anything about college football. That said, it sounds like we hit a lot of our needs, including OL and DBs. Sounds like the receiver we took in Round 1 should fit in pretty well with what Shanahan wants in a receiver, so I'm excited to see how that goes. I have no complaints!

[–] [email protected] 2 points 2 months ago

There's lots of youtube content on this subject... here's a decent jumping off point, if you're interested: https://www.youtube.com/watch?v=7Nw6qyyrTeI

[–] [email protected] 0 points 2 months ago

I have server2 (which replaced server1). I also have 'nvr1'.

 

The server has been updated to version 0.19.3

View the release notes here: https://join-lemmy.org/news/2024-01-22_-_Lemmy_Release_v0.19.3_-_A_Few_Bugfixes

 

cross-posted from: https://tkohhh.social/post/4829

Unfortunately, the official documentation on theming lemmy is severely lacking. I made some progress on getting it figured out today, so I wanted to share that with you all.

This is by no means meant to be an exhaustive guide, but my hope is that it will at least get you going. I'm sure that I will say things that are incorrect, so please correct me if you know better!

Background

Lemmy uses Bootstrap-compatible theming. As far as I can tell, this means that it uses a pre-defined set of CSS classes. This is important because if you provide a CSS file that doesn't have all of the correct classes defined, it will break the layout of your lemmy.

Your custom CSS needs to be saved in the bind mount for your lemmy-ui container. If you followed the install instructions on join-lemmy.org, the location will be /lemmy/volumes/lemmy-ui/extra_themes/.

Prerequisites

In order to generate the correct CSS, you need a couple of things:

  • your customized Bootstrap variables, saved in an scss file
  • the Bootstrap scss files
  • the SASS compiler

Let's go through each of these (last to first):

The SASS compiler

The SASS compiler needs to be installed on the machine you will use to generate your CSS files (it doesn't NEED to be the computer that lemmy is installed on, but it can be). Follow the install instructions relevant to you. I used the "Install Anywhere (Standalone)" instructions and installed SASS on the Ubuntu machine that is running my lemmy instance.

The Bootstrap scss files

These files need to be saved on the same machine as the SASS compiler. The Bootstrap download page has a button to download the source files ("Download source"). This will give you a zip folder, so unzip it. Within the unzipped files, the only directory you need to keep is /bootstrap-5.3.0/scss. Save that folder in a place that makes sense for you. I put it in my home directory, so the path looks like ~/bootstrap-5.3.0/scss. You'll need to reference this directory when you're creating your custom scss file.

Your customized Bootstrap variables, saved in an scss file

This is the fun part... you define your Bootstrap variables. I'm still a little unclear on which version of Bootstrap lemmy is using (and therefore which variables are valid), so I chose to start with one of lemmy's default themes as a starting point. I grabbed _variables.litely.scss and litely.scss from the lemmy-ui github repo as a starting point.

You'll notice that litely.scss is just importing variables.litely as well as the Bootstrap scss files. You'll need to change the path of the Bootstrap scss files to the path where you saved your copy of the files. However, leave bootstrap at the end of the file path, as this is actually referring to the bootstrap.scss file within the Bootstrap scss directory.

It wasn't obvious to me initially, but you can also add your own CSS styles at the bottom of your scss file. These will be merged with the styles defined in the Bootstrap files. For instance, I wanted my navbar to have a different font from the body, so I added this:

#navbar {
  font-family: sans-serif;
}

Generating the CSS file

Once you have all of the prerequisites satisfied, you can generate your CSS files using the SASS compiler. Go to the directory where your customized scss file(s) are saved, and run this command (you added the SASS install directory to your PATH, right??):

sass [inputfile.scss] [outputfile.css]

This will generate a CSS file. However, pay attention, as there might be errors. If so, fix the errors until you can run SASS without any errors.

Finally, drop the generated CSS file into your "extra_themes" directory. You'll now see your theme show up in the list of themes on your profile (it'll be the filename of your CSS file).


And that's it! I hope somebody finds this helpful. Please let me know if there's anything I can clarify!

view more: next ›