There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

webghost0101 OP , to linux in I use Arch by the way Edit: ❤️

Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise. No misinformation No NSFW content No hate speech, bigotry, etc

In my defence i did check the rules if Memes where allowed!

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
</span><span style="color:#323232;">No misinformation
</span><span style="color:#323232;">No NSFW content
</span><span style="color:#323232;">No hate speech, bigotry, etc
</span>
Hiru , to mildlyinteresting in LED bulb PCB after failure
@Hiru@lemmy.world avatar
<pre style="background-color:#ffffff;">
<span style="color:#323232;">(ง •̀_•́)ง
</span>

Can someone explain to me the difference between "community-driven" and "corporate-driven" distributions and its implications?

A lot of debate today about “community” vs “corporate”-driven distributions. I (think I) understand the basic difference between the two, but what confuses me is when I read, for example:...

digdilem , to linux in Can someone explain to me the difference between "community-driven" and "corporate-driven" distributions and its implications?

Nice summary. One minor, but important, addition to your post:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">much worse for Fedora, they have been culturally enslaved by Red Hat, 
</span>

Not just culturally - Redhat legally own Fedora too. Legally owning Centos was how Redhat managed to kill Centos Linux. One of the key things Greg wdid when creating Rocky two years ago was set the legal status so that Rocky could never be taken over in the way Centos was.

IsoKiero , to linux in How to make a command run everyday at a specific time?

Since you only need to run a single command as a user open terminal and give command ‘crontab -e’. If you haven’t set an editor it’ll ask for one, pick nano.

The syntax for crontab is like this (man 5 crontab will show it on your system as well):

<pre style="background-color:#ffffff;">
<span style="color:#323232;">field          allowed values
</span><span style="color:#323232;">-----          --------------
</span><span style="color:#323232;">minute         0–59
</span><span style="color:#323232;">hour           0–23
</span><span style="color:#323232;">day of month   1–31
</span><span style="color:#323232;">month          1–12 (or names, see below)
</span><span style="color:#323232;">day of week    0–7 (0 or 7 is Sun, or use names)
</span><span style="color:#323232;">command to run with full path
</span>

So, in your case put in this line:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">0 10 * * * /usr/bin/sct 2750
</span>

I’m not sure if sct is really at that path and I don’t have that installed, so verify that first (run ‘which sct’). Save the file and exit editor (ctrl+o, ctrl+x on nano). That’s it. However, I don’t quarantee results with that, since X with environment variables and all may cause issues, but if that’s the case I’m sure this community can help with that as well.

Help! Instance syncronizing in a very weird way

Hi, so I launched my very own instance. I’m posting from here, and hopefully this post makes it there. I subscribed to a few coms, but I’m getting outdated posts and the votes don’t line up, also the comments do not all load. So I’m able to federate, but for some reason only some of the data is coming over to my...

Max_P , (edited ) to selfhosted in Help! Instance syncronizing in a very weird way
@Max_P@lemmy.max-p.me avatar

How long has it been? If you just spun it up, what you’ve seen is just the initial pull of the content. As you subscribe, all new content will get pushed to you, but the old content never backfills.

Check your NGINX logs, you should see a bunch of POST requests to /inbox and status of 200 that looks like this:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">54.36.178.108 - - [13/Jul/2023:01:10:16 -0400] "POST /inbox HTTP/1.1" 200 0 "-" "Lemmy/0.18.2; +https://lemmy.ml"
</span><span style="color:#323232;">54.36.178.108 - - [13/Jul/2023:01:10:16 -0400] "POST /inbox HTTP/1.1" 200 0 "-" "Lemmy/0.18.2; +https://lemmy.ml"
</span><span style="color:#323232;">54.36.178.108 - - [13/Jul/2023:01:10:17 -0400] "POST /inbox HTTP/1.1" 200 0 "-" "Lemmy/0.18.2; +https://lemmy.ml"
</span><span style="color:#323232;">54.36.178.108 - - [13/Jul/2023:01:10:17 -0400] "POST /inbox HTTP/1.1" 200 0 "-" "Lemmy/0.18.2; +https://lemmy.ml"
</span><span style="color:#323232;">54.36.178.108 - - [13/Jul/2023:01:10:18 -0400] "POST /inbox HTTP/1.1" 200 0 "-" "Lemmy/0.18.2; +https://lemmy.ml"
</span><span style="color:#323232;">54.36.178.108 - - [13/Jul/2023:01:10:19 -0400] "POST /inbox HTTP/1.1" 200 0 "-" "Lemmy/0.18.2; +https://lemmy.ml"
</span><span style="color:#323232;">54.36.178.108 - - [13/Jul/2023:01:10:19 -0400] "POST /inbox HTTP/1.1" 200 0 "-" "Lemmy/0.18.2; +https://lemmy.ml"
</span>

Included a bunch, as you can see they should be coming in quite frequently, basically everytime someone does something on the remote instance.

Make sure you’re subscribed to the community as well

Basic curl testing seems to rule out common routing problems, so check the lemmy logs as well just in case.

simonced , to linux in Neovim, LSP format issues all of a sudden

I can’t read your config because the screen shot is too small, you should post block of text with ``` before and after.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">It'll loke like this.
</span>

Then, I don’t do C++, and I have never encountered this issue, but if you’re using Mason in your setup, you might want to try to update your language server, then use the command LspRestart maybe…

waspentalive , (edited ) to selfhosted in How do you backup things to your server?

rsync:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">#! /usr/bin/sh
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">TIMESTAMP_LOG="/path/to/logdir/.backuplog"
</span><span style="color:#323232;">BACKUP_DEST="server:/path/to/backup/$1"
</span><span style="color:#323232;">TIMESTAMP=$(date +"%Y-%m-%d %H:$M:%S")
</span><span style="color:#323232;">
</span><span style="color:#323232;">echo "backup to:$BACKUP_DEST"
</span><span style="color:#323232;">echo "Backup: $BACKUP_DEST $TIMESTAMP" >> $TIMESTAMP_LOG
</span><span style="color:#323232;">pause
</span><span style="color:#323232;">rsync -auvh /path/to/homedir* rhudson@$BACKUP_DEST
</span>

This should be called with a name of a target subdirectory in BACKUP_DEST… mine are rsynca, rsyncb, rsyncc but I will change this soon for day of week based directories.

I also have certificate authentication setup on ssh on my server - that’s why no password is needed.

Someday I will set up tailscale between this machine and the server.

GodOfThunder OP , to nostupidquestions in How would you quote someone using CommonMark markdown syntax?
<pre style="background-color:#ffffff;">
<span style="color:#323232;">> *@username* said:
</span><span style="color:#323232;">>
</span><span style="color:#323232;">> > Original quote from the person
</span><span style="color:#323232;">>
</span><span style="color:#323232;">> Source: [Link to the source](source_link)
</span>

For example:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">> @[email protected] said:
</span><span style="color:#323232;">>
</span><span style="color:#323232;">> > How would you quote someone using CommonMark markdown syntax?
</span><span style="color:#323232;">>
</span><span style="color:#323232;">> [Source](https://lemm.ee/post/1063209)
</span>

Result:

@GodOfThunder said:

How would you quote someone using CommonMark markdown syntax?

Source

tubbadu , (edited ) to piracy in trying to install Minecraft on my steam deck

I don’t have a steamdeck to try this onto, but check this out, it seems very straightforward:

open a terminal, and then paste this:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">git clone https://github.com/BlackCorsair/install-jdk-on-steam-deck.git
</span><span style="color:#323232;">bash ./install-jdk-on-steam-deck/scripts/install-jdk.sh
</span>

this will download from github the repository containing the install-jdk.sh script, and then execute it.

close the terminal and open it back in order to source all needed files, and check the correct installation by running

<pre style="background-color:#ffffff;">
<span style="color:#323232;">java -version
</span>

if everything goes flawless, you should have java installed in ~/.local/jdk/

RickRussell_CA , (edited ) to technology in Non right-wing tech podcasts?
<pre style="background-color:#ffffff;">
<span style="color:#323232;">ERROR. ABORT MESSAGE? Y/N
</span><span style="color:#323232;">
</span><span style="color:#323232;">> Y
</span>

~~Do you have a citation on Rossman supporting Trump?

I can’t say I’ve heard him express any political opinions outside of the fairly narrow lanes of right-to-repair and regulatory abuse. ~~

DataDreadnought , to selfhosted in What are your backup solutions?
@DataDreadnought@lemmy.one avatar

I doubt your using NixOS so this config might seem useless but at its core it is a simple systemd timer service and bash scripting.

To convert this to another OS you will use cron to call the script at the time you want. Copy the part between script=“” and then change out variables like the location of where docker-compose is stored since its different on NixOS.

Let me explain the script. We start out by defining the backupDate variable, this will be the name of the zip file. As of now that variable would be 2023-07-12. We then go to each folder with a docker-compose.yml file and take it down. You could also replace down with stop if you don’t plan on updating each night like I do. I use rclone to connect to Dropbox but rclone supports many providers so check it out and see if it has the one you need. Lastly I use rclone to connect to my Dropbox and delete anything older than 7 days in the backup folder. If you end up going my route and get stuck let me know and I can help out. Good luck.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">systemd = {
</span><span style="color:#323232;">      timers.docker-backup = {
</span><span style="color:#323232;">        wantedBy = [ "timers.target" ];
</span><span style="color:#323232;">        partOf = [ "docker-backup.service" ];
</span><span style="color:#323232;">        timerConfig.OnCalendar= "*-*-* 3:30:00";
</span><span style="color:#323232;">      };
</span><span style="color:#323232;">      services.docker-backup = {
</span><span style="color:#323232;">        serviceConfig.Type = "oneshot";
</span><span style="color:#323232;">        serviceConfig.User = "root";
</span><span style="color:#323232;">        script = ''
</span><span style="color:#323232;">        backupDate=$(date  +'%F')
</span><span style="color:#323232;">        cd /docker/apps/rss
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose down
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/apps/paaster
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose down
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/no-backup-apps/nextcloud
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose down
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/apps/nginx-proxy-manager
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose down
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/backups/
</span><span style="color:#323232;">        ${pkgs.zip}/bin/zip -r server-backup-$backupDate.zip /docker/apps
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/apps/nginx-proxy-manager
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose pull
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose up -d
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/apps/paaster
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose pull
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose up -d
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/apps/rss
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose pull
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose up -d
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/no-backup-apps/nextcloud
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose pull
</span><span style="color:#323232;">        ${pkgs.docker-compose}/bin/docker-compose up -d
</span><span style="color:#323232;">
</span><span style="color:#323232;">        cd /docker/backups/
</span><span style="color:#323232;">        ${pkgs.rclone}/bin/rclone copy server-backup-$backupDate.zip Dropbox:Server-Backup/
</span><span style="color:#323232;">        rm server-backup-$backupDate.zip
</span><span style="color:#323232;">        ${pkgs.rclone}/bin/rclone delete --min-age 7d Dropbox:Server-Backup/
</span><span style="color:#323232;">        '';
</span><span style="color:#323232;">      };
</span><span style="color:#323232;">    };
</span><span style="color:#323232;">
</span>
eager_eagle , to linux in How can I use BASH to parse metadata from jpg and mp4 files?
@eager_eagle@lemmy.world avatar

maybe something like this using mediainfo and exiftool?

<pre style="background-color:#ffffff;">
<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;">for file in *.jpg *.mp4; do
</span><span style="color:#323232;">    # Extract date and time from file's metadata
</span><span style="color:#323232;">    if [[ $file == *.jpg ]]; then
</span><span style="color:#323232;">        datetime=$(exiftool -DateTimeOriginal -d "%Y%m%d_%H%M%S" "$file" | awk -F': ' '{print $2}')
</span><span style="color:#323232;">    else
</span><span style="color:#323232;">        datetime=$(mediainfo --Output="General;%File_Modified_Date%" "$file" | awk -F' ' '{print $1"_"$2}' | tr -d ':' | tr -d '-')
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # If datetime was found, rename the file 
</span><span style="color:#323232;">    if [ -n "$datetime" ]; then
</span><span style="color:#323232;">        # Extract extension of file 
</span><span style="color:#323232;">        ext="${file##*.}"
</span><span style="color:#323232;">        # Rename file with date and time as prefix (remove echo after testing it)
</span><span style="color:#323232;">        echo mv -- "$file" "${datetime}.${ext}"
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">done
</span>
sneakyninjapants , to selfhosted in Uptime-kuma & Docker: Timeouts when monitoring services on same host

The way I have my monitoring set up is to poll the containers from behind the proxy layer. Ex. if I’m trying to poll Portainer for example:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">---
</span><span style="color:#323232;">services:
</span><span style="color:#323232;">    portainer:
</span><span style="color:#323232;">    ...
</span>

with the service name portainer

from uptime-kuma within the same docker network it would look like this:

https://sh.itjust.works/pictrs/image/daab1603-f8d8-4030-999d-f31f05b87305.png

Can confirm this is working correctly to monitor that the service is reachable. This doesn’t however ensure that you can reach it from your computer, because that depends on if your reverse proxy is configured correctly and isn’t down, but that’s what I wanted in my case.

Edit: If you’re wanting to poll the http endpoint you would add it before like http://whatever_service:whatever_port

Configurable self-hosted "personal dashboard"?

I would like to have a screen in my home displaying a summary of different information that is relevant to me, like weather forecast, bus/train times, news headlines, etc. I was planning to use a Raspberry Pi and either buy a screen to display the information or just show it on my TV. It could probably be as simple as serving a...

idle , to selfhosted in Configurable self-hosted "personal dashboard"?
@idle@158436977.xyz avatar

Keep in mind they are hacked together and were not meant for mass consumption. Here is an example of one of the scripts that contacts the gitea api and inserts the most recent 10 issues into Flames database with a specific category.

`import sqlite3 from datetime import datetime import requests import re import json from datetime import datetime, timezone

def insert_bookmark(name, url, category_id, order_id): conn = sqlite3.connect(‘/app/db.sqlite’) cursor = conn.cursor()

<pre style="background-color:#ffffff;">
<span style="color:#323232;">cursor.execute("SELECT MAX(id) FROM bookmarks")
</span><span style="color:#323232;">result = cursor.fetchone()
</span><span style="color:#323232;">max_id = result[0] if result[0] else 0
</span><span style="color:#323232;">
</span><span style="color:#323232;">current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f %z')
</span><span style="color:#323232;">values = (name, url, category_id, "", current_time, current_time, 0, order_id)
</span><span style="color:#323232;">
</span><span style="color:#323232;">cursor.execute("INSERT INTO bookmarks (name, url, categoryId, icon, createdAt, updatedAt, isPublic, orderId) VALUES (?, ?, ?, ?, ?, ?, ?, ?);", values)
</span><span style="color:#323232;">
</span><span style="color:#323232;">max_id += 1
</span><span style="color:#323232;">
</span><span style="color:#323232;">conn.commit()
</span><span style="color:#323232;">conn.close()
</span><span style="color:#323232;">
</span><span style="color:#323232;">return max_id
</span>

def delete_bookmark(category_id): conn = sqlite3.connect(‘/app/db.sqlite’) cursor = conn.cursor() cursor.execute(“DELETE FROM bookmarks WHERE categoryId = ?”, (category_id,)) # Commit the changes and close the connection conn.commit() conn.close()

def get_recently_updated_issues(repo_urls, user_name, api_token): headers = { “Authorization”: f"token {api_token}“, “Content-Type”: “application/json” }

<pre style="background-color:#ffffff;">
<span style="color:#323232;">all_issues = []
</span><span style="color:#323232;">
</span><span style="color:#323232;">for repo_url, repo_name in repo_urls:
</span><span style="color:#323232;">    api_url = repo_url
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Query the Gitea API to get the issues
</span><span style="color:#323232;">    response = requests.get(api_url, headers=headers, params={"state": "all"})
</span><span style="color:#323232;">    response.raise_for_status()
</span><span style="color:#323232;">
</span><span style="color:#323232;">    issues = response.json()
</span><span style="color:#323232;">
</span><span style="color:#323232;">    sorted_issues = sorted(issues, key=lambda x: x["updated_at"], reverse=True)
</span><span style="color:#323232;">
</span><span style="color:#323232;">    all_issues.extend(sorted_issues[:5])
</span><span style="color:#323232;">
</span><span style="color:#323232;">sorted_all_issues = sorted(all_issues, key=lambda x: x["updated_at"], reverse=True)
</span><span style="color:#323232;">
</span><span style="color:#323232;">recent_issue_titles = []
</span><span style="color:#323232;">recent_issue_links = []
</span><span style="color:#323232;">recent_timestamps = []
</span><span style="color:#323232;">
</span><span style="color:#323232;">for issue in sorted_all_issues[:10]:
</span><span style="color:#323232;">    title = issue["title"]
</span><span style="color:#323232;">    link = issue["html_url"]
</span><span style="color:#323232;">    timestamp = issue["updated_at"]
</span><span style="color:#323232;">
</span><span style="color:#323232;">    recent_issue_titles.append(title)
</span><span style="color:#323232;">    recent_issue_links.append(link)
</span><span style="color:#323232;">    recent_timestamps.append(timestamp)
</span><span style="color:#323232;">
</span><span style="color:#323232;">return recent_issue_titles, recent_issue_links, recent_timestamps
</span>

repo_urls = [ (”gitea.example.com/api/v1/repos/user1/…/issues“, “repo1”), (”gitea.example.com/api/v1/repos/user1/…/issues", “repo2”) ] user_name = “user1” api_token = “example token”

delete_bookmark(8) order_id = 1

recent_issue_titles, recent_issue_links, recent_timestamps = get_recently_updated_issues(repo_urls, user_name, api_token)

for title, link, timestamp in zip(recent_issue_titles, recent_issue_links, recent_timestamps): print(“Issue Title:”, title) print(“Issue Link:”, link) print(“Last Updated:”, timestamp) print() bookmark_id = insert_bookmark(title, link, 8, order_id) order_id += 1`

Anyone else starting to favor Flatpak over native packages?

I am currently using Linux Mint (after a long stint of using MX Linux) after learning it handles Nvidia graphics cards flawlessly, which I am grateful for. Whatever grief I have given Ubuntu in the past, I take it back because when they make something work, it is solid....

BaconIsAVeg , to linux in Anyone else starting to favor Flatpak over native packages?

This. Having to open a console to run a flatpak in bspwm is annoying as all hell. PWA’s are just as bad, I ended up writing a script I could run from dmenu:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">#!/usr/bin/env bash
</span><span style="color:#323232;">
</span><span style="color:#323232;">PWA_PATH=${HOME}/.local/share/applications
</span><span style="color:#323232;">
</span><span style="color:#323232;">for app in $@
</span><span style="color:#323232;">do
</span><span style="color:#323232;">  DESKTOP=$(grep -i "Name=.*${app}" -lm 1 ${PWA_PATH}/*.desktop)
</span><span style="color:#323232;">  if [ ! -z ${DESKTOP} ]
</span><span style="color:#323232;">  then
</span><span style="color:#323232;">    APPID=$(basename ${DESKTOP} | cut -d- -f2)
</span><span style="color:#323232;">    /usr/bin/google-chrome --profile-directory=Default --app-id=${APPID} &
</span><span style="color:#323232;">  fi
</span><span style="color:#323232;">done
</span><span style="color:#323232;">
</span>
deong , to linux in Anyone else starting to favor Flatpak over native packages?

And in a way, everything is a CLI tool on most normal systems. Evince or Acroread or whatever you prefer to read PDFs is not “a CLI tool”, but if I want to use LaTeX to create a document, I want to be able to do something like

<pre style="background-color:#ffffff;">
<span style="color:#323232;">$ xelatex myfile.tex
</span><span style="color:#323232;">$ evince myfile.pdf &
</span>

I don’t want to have to build my document, bring up my app launcher, click on the Evince icon, hit Ctrl-O, navigate to my pdf file, and double click it.

bizdelnick , to linux in Documenting commands # or $ before sudo?

# is a standard shell prompt for root, and only for root. For commands executed by any other user, including sudo, use $.

In general it is a bad practice to use sudo in documentation because in many distros it is not available by default. I would use su for your example. However system users have no passwords, so you need to become root first, and only after that change user to avoid prompting a password. So I would write

<pre style="background-color:#ffffff;">
<span style="color:#323232;"># su -s /bin/bash www-data
</span><span style="color:#323232;">$ cp /var/www/html/html1 /var/www/html/html2
</span>

or

<pre style="background-color:#ffffff;">
<span style="color:#323232;"># su -s /bin/sh -c 'cp /var/www/html/html1 /var/www/html/html2' www-data
</span>

But if you are sure that sudo is installed and configured on a user’s machine, you may write

<pre style="background-color:#ffffff;">
<span style="color:#323232;">$ sudo -u www-data cp /var/www/html/html1 /var/www/html/html2
</span>
bizdelnick , to linux in Documenting commands # or $ before sudo?

The non-root user probably doesn’t have permission to run the sudo command as www-data user, but root does.

You are wrong. E. g. in Debian (and Ubuntu) the default sudoers file contains

<pre style="background-color:#ffffff;">
<span style="color:#323232;">%sudo   ALL=(ALL:ALL) ALL
</span>

that means that any user in the sudo group is permitted to execute any command as any other user. The same for redhat/fedora, but the group name is wheel there.

jg1i , to showerthoughts in People born in the year 2000 don't have to try and calculate how old they are when people ask them their age

Trying to do this mentally:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">1989 + 1 = 1990
</span><span style="color:#323232;">2023 - 2000 = 23
</span><span style="color:#323232;">2000 - 1990 = 10
</span><span style="color:#323232;">23 + 10 = 33
</span>

33 - 1 = 32 Ha! Easy!.. Wait.

33 + 1 = 34 Shit. Double+1. Ok, I thought the -1 at the end would undo the +1 at the beginning. But, I guess the 2000-1990 messed me up.

Maybe

<pre style="background-color:#ffffff;">
<span style="color:#323232;">2000 - 1990 = 10
</span><span style="color:#323232;">1990 - 1989 = 1
</span><span style="color:#323232;">2023 - 2000 = 23
</span><span style="color:#323232;">23 + 1 = 24
</span><span style="color:#323232;">24 + 10 = 34
</span>
tony , (edited ) to linux in My missionary activities are working!

Worldwide it’s:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Android	40.16%
</span><span style="color:#323232;">Windows	28.59%
</span><span style="color:#323232;">iOS	16.8%
</span><span style="color:#323232;">OS X	8.97%
</span><span style="color:#323232;">Chrome OS	1.74%
</span><span style="color:#323232;">Unknown	1.43%
</span>

Europe:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Windows	35.17%
</span><span style="color:#323232;">Android	35.01%
</span><span style="color:#323232;">iOS	18.93%
</span><span style="color:#323232;">OS X	7.02%
</span><span style="color:#323232;">Linux	1.42%
</span><span style="color:#323232;">Unknown	1.14%
</span>

USA:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Windows	35.64%
</span><span style="color:#323232;">OS X	20.59%
</span><span style="color:#323232;">iOS	18.93%
</span><span style="color:#323232;">Android	15.69%
</span><span style="color:#323232;">Chrome OS	4.94%
</span><span style="color:#323232;">Xbox	2.15%
</span>
ChamelAjvalel OP , to showerthoughts in So, there is a method for finding if a number is divisible by 7.

I did find that it can be done arbitrarily. Mind is definitely not into writing about it, though, but here’s the gp code I wrote to look it over.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">/*
</span><span style="color:#323232;">    There may exist a 0<=t<s such that
</span><span style="color:#323232;">    s divides both x and (x+(x%d)*(t*d-1))/d.
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">    To show this for solving for divisibility of 7 in 
</span><span style="color:#323232;">    any natural number x.
</span><span style="color:#323232;">
</span><span style="color:#323232;">    g(35,5,10) = 28
</span><span style="color:#323232;">    g(28,5,10) = 42
</span><span style="color:#323232;">    g(42,5,10) = 14
</span><span style="color:#323232;">    g(14,5,10) = 21
</span><span style="color:#323232;">    g(21,5,10) =  7
</span><span style="color:#323232;">*/
</span><span style="color:#323232;">
</span><span style="color:#323232;">g(x,t,d)=(x+(x%d)*(t*d-1))/d;
</span><span style="color:#323232;">
</span><span style="color:#323232;">/* Find_t( x = Any natural number that is divisible by s,
</span><span style="color:#323232;">           s = The divisor the search is being done for,
</span><span style="color:#323232;">           d = The modulus restriction ).
</span><span style="color:#323232;">
</span><span style="color:#323232;">    Returns all possible t values.
</span><span style="color:#323232;">*/
</span><span style="color:#323232;">
</span><span style="color:#323232;">Find_t(x,s, d) = {
</span><span style="color:#323232;">    V=List();
</span><span style="color:#323232;">    
</span><span style="color:#323232;">    for(t=2,d-1,
</span><span style="color:#323232;">        C = factor(g(x,t,d));
</span><span style="color:#323232;">        for(i=1,matsize(C)[1],if(C[i,1]==s, listput(V,t))));
</span><span style="color:#323232;">        
</span><span style="color:#323232;">    return(V);
</span><span style="color:#323232;">}   
</span>

One thing that I noticed almost right away, regardless what d is, it seems to always work when s is prime, but not when s is composite.

Too tired…Pains too much…Have to stop…But still…interesting.

Would there be any benifit to host another instance?

As the question states. I have the skiils and know how to setup a new instsnce and from looking through the documentation its relatively straight forward. Im just wondering would it actually help the fediverse and lemmy as a whole? There seems to already be plenty of instances to choose from. What are your guys thoughts?

Die4Ever , (edited ) to fediverse in Would there be any benifit to host another instance?
@Die4Ever@programming.dev avatar

what happens when you clear pictrs? you mean just deleting the folder? does that break stuff?

for comparison, my instance is only communities and no users (FAQ here: programming.dev/post/442419 )

it’s about 5 days old but not much activity

<pre style="background-color:#ffffff;">
<span style="color:#323232;"># du -h --max-depth=2 ./
</span><span style="color:#323232;">73M     ./volumes/postgres
</span><span style="color:#323232;">7.8M    ./volumes/pictrs
</span><span style="color:#323232;">8.0K    ./volumes/lemmy-ui
</span><span style="color:#323232;">81M     ./volumes
</span><span style="color:#323232;">81M     ./
</span>

the latest backup is only 7.4 MB zipped, I use this backup script

<pre style="background-color:#ffffff;">
<span style="color:#323232;">#! /bin/bash
</span><span style="color:#323232;"># https://join-lemmy.org/docs/administration/backup_and_restore.html#a-sample-backup-script
</span><span style="color:#323232;">now=$(date +"%Y-%m-%d_%H.%M.%S")
</span><span style="color:#323232;">
</span><span style="color:#323232;">cd ~/lemmy && (docker-compose exec -T postgres pg_dumpall -c -U lemmy 1> dump.sql 2> dump.errors)
</span><span style="color:#323232;">cd ~/lemmy && zip -r9 ~/bak-lemmy-$now.zip ./ --exclude "volumes/postgres/*"
</span><span style="color:#323232;">rm -f ~/lemmy/dump.sql
</span>

like I said though, not much activity

https://programming.dev/pictrs/image/e6fe36df-7d62-4d9e-90d1-6c7a50c42793.png

and here’s how my backup zip files have grown in size over time

<pre style="background-color:#ffffff;">
<span style="color:#323232;">6.6M bak-lemmy-2023-07-08_03.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-08_06.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-08_09.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-08_12.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-08_15.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-08_18.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-08_21.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_00.00.02.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_03.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_06.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_09.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_12.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_15.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_18.00.01.zip
</span><span style="color:#323232;">6.6M bak-lemmy-2023-07-09_21.00.01.zip
</span><span style="color:#323232;">6.7M bak-lemmy-2023-07-10_00.00.01.zip
</span><span style="color:#323232;">6.7M bak-lemmy-2023-07-10_03.00.01.zip
</span><span style="color:#323232;">6.7M bak-lemmy-2023-07-10_06.00.01.zip
</span><span style="color:#323232;">6.7M bak-lemmy-2023-07-10_09.00.01.zip
</span><span style="color:#323232;">6.8M bak-lemmy-2023-07-10_12.00.01.zip
</span><span style="color:#323232;">6.8M bak-lemmy-2023-07-10_15.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-10_18.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-10_21.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-11_00.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-11_03.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-11_06.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-11_09.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-11_12.00.01.zip
</span><span style="color:#323232;">7.0M bak-lemmy-2023-07-11_15.00.01.zip
</span><span style="color:#323232;">7.4M bak-lemmy-2023-07-11_18.00.01.zip
</span>

The dominance of cat content VS dog content on Lemmy reflects its current techie userbase

I originally joined Reddit in 2011, and in the beginning it was dominated by cat content. It was rare to see a post about dogs. Sometime in the mid 20-teens this phenomenon reversed. It’s always been a “pet theory” of mine that this reversal was due to Reddit becoming mainstream, and that it’s initial nerdy/techie user...

Willer , to showerthoughts in The dominance of cat content VS dog content on Lemmy reflects its current techie userbase

“i literallly meow just for you”

<pre style="background-color:#ffffff;">
<span style="color:#323232;">             - cat
</span>
jjjalljs , to nostupidquestions in Using Python, How can I create a bot/script that let's me re-post a subreddit's post to Lemmy?

Really? You hate python but recommend typescript? All the problems you cited about python are there, too!

Garbage stack traces that go through a hundred lines of node modules.

Dependency hell. Peer deps. Npm or yarn? An ecosystem where packages have a half life of weeks. A new major version of node comes out literally every six months. SIX MONTHS. MAJOR VERSION CHANGE. And you complained about python2 vs 3!

Typescript also has a garbage debugger compared to python.

There’s also just too many ways of doing things because the standard lib is thin. How many ways to loop over an object are there? For in, for each, object keys, lodash, underscore, object.entries, what am I forgetting?

Newer versions have stuff in the standard lib like Array.at, but if you’re targeting an older browser that won’t work unless you enter the wonderful world of transpiling and polyfills. And you thought virtualenv was bad??

And let’s not forget the language’s obsession with being async, even when you don’t expect or want it. How many hours have been lost because someone forgot to await response.json()?

Oh right and remember how there’s like six ways of declaring a function. The function keyword, when it’s in a class, and like four variations on arrow function syntax. And arrow functions are different than ones with the function keyword.

And lots of other little weird gotchas like

<pre style="background-color:#ffffff;">
<span style="color:#323232;">const foo = "hello";
</span><span style="color:#323232;">const bar = { foo: "world"};
</span>

Go on. What do you think that object key is? The syntax is insane . You need to do { [foo]: “world”} to reference a variable as a key. Which looks like a list. Because typescript/javascript is kind of bad.

Typescript is used in the browser because that’s the only thing really supported there for front ends. It’s a horrible tool for anything else.

I think the average person just simply doesn't care about their privacy.

In some of the music communities I’m in the content creators are already telling their userbase to go follow them on threads. They’re all talking about some kind of beef between Elon and Mark and the possibility of a boxing match… Mark was right to call the people he’s leaching off of fucking idiots.

Freesoftwareenjoyer , to fediverse in I think the average person just simply doesn't care about their privacy.

Yes, there are many things that people should be taught at school. Technology is just one area. All of the things you said are also very important, but it doesn’t make what I said invalid.

Knowing marketing, for example, wouldn’t cause someone to be fooled to the point of saying something like this:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">But they should know what cryptocurrencies and AI are, since those technologies are slowly becoming a part of our lives.
</span>

Fooled by what exactly? A distributed ledger or machine learning? I think it’s a simple fact that those technologies are becoming more popular.

You make it sound like the problem is technology.

The post is about privacy and software. It’s important for people to be educated in other areas as well, but they weren’t the topic of this discussion. So there was no point for me to mention them.

You’re focusing on a single channel of abuse.

I make software, so I talk about software. I’m not an expert in the other areas that you mentioned.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines