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.

You can't uninstall this software without being forced to participate in their survey (lemmy.world)

I initially only installed “Comodo Firewall” but for some reason they also installed a “Comodo Dragon Browser”, which I did not consent to. I always choose the “advanced” installation to uncheck bloatware, but in this case there was none and when you try to uninstall the browser, they force you to participate in...

ProfessorGumby , to mildlyinfuriating in You can't uninstall this software without being forced to participate in their survey
@ProfessorGumby@midwest.social avatar
<pre style="background-color:#ffffff;">
<span style="color:#323232;">....................................................................
</span>
czak OP , to linux in How to accurately measure laptop battery life in Linux?

Thanks, I do like powertop. I think it’s pretty good for short measurements, e.g. over 30 seconds:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">% sudo powertop --time=30
</span><span style="color:#323232;">
</span><span style="color:#323232;">The battery reports a discharge rate of 4.17 W
</span><span style="color:#323232;">The energy consumed was 125 J
</span><span style="color:#323232;">The estimated remaining time is 11 hours, 4 minutes
</span>

But in the real world I will not be getting 11 hours of runtime. The moment I start a browser or play a video, power consumption goes way up.

btobolaski , to selfhosted in Lemmy, Traefik, & Docker

This is my ingressroute for lemmy:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">
</span><span style="color:#323232;">apiVersion: traefik.containo.us/v1alpha1
</span><span style="color:#323232;">kind: IngressRoute
</span><span style="color:#323232;">metadata:
</span><span style="color:#323232;">  name: lemmy
</span><span style="color:#323232;">spec:
</span><span style="color:#323232;">  entryPoints:
</span><span style="color:#323232;">    - web
</span><span style="color:#323232;">  routes:
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`) && PathPrefix(`/api/`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`) && PathPrefix(`/pictrs/`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`) && PathPrefix(`/feeds/`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`) && PathPrefix(`/nodeinfo/`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`) && PathPrefix(`/.well-known/`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`) && Method(`POST`, `PUT`, `DELETE`, `PATCH`, `CONNECT`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`) && HeadersRegexp(`Accept`, `application/(?:activity|ld)+json`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span><span style="color:#323232;">    - kind: Rule
</span><span style="color:#323232;">      match: Host(`threads.ruin.io`)
</span><span style="color:#323232;">      services:
</span><span style="color:#323232;">        - kind: Service
</span><span style="color:#323232;">          name: lemmy-ui
</span><span style="color:#323232;">          passHostHeader: true
</span><span style="color:#323232;">          port: 80
</span>

It seems to work correctly. Given that you’re not using kubernetes, you’ll need to do some translation work.

zikk_transport2 , to selfhosted in Lemmy, Traefik, & Docker

Here is the example docker-compose.yml:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">services:
</span><span style="color:#323232;">  caddy:
</span><span style="color:#323232;">    image: caddy
</span><span style="color:#323232;">    container_name: caddy
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - ./caddy/data:/data
</span><span style="color:#323232;">      - ./caddy/config:/config
</span><span style="color:#323232;">      - ./caddy/Caddyfile:/etc/caddy/Caddyfile
</span><span style="color:#323232;">    ports:
</span><span style="color:#323232;">      - 80:80/tcp
</span><span style="color:#323232;">      - 443:443/tcp
</span><span style="color:#323232;">      - 443:443/udp
</span><span style="color:#323232;">    restart: always
</span><span style="color:#323232;">
</span><span style="color:#323232;">  lemmy:
</span><span style="color:#323232;">    image: lemmy
</span><span style="color:#323232;">    container_name: lemmy
</span><span style="color:#323232;">    ...
</span>

Before executing, create a new directory caddy i working directory, then create new file Caddyfile in it (lemmy is a container name):

<pre style="background-color:#ffffff;">
<span style="color:#323232;">mydomain.com {
</span><span style="color:#323232;">    reverse_proxy lemmy:<lemmy_container_http_port>
</span><span style="color:#323232;">    encode zstd gzip
</span><span style="color:#323232;">}
</span>

Then fix your UDP Buffer size, so it’s compatible with QUIC: github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes

And that’s it. tcp80, tcp443 and udp443 should be reachable from anywhere, as Caddy out of the box uses ACME to retrieve TLS certificates for your domain.

Give it a try. Honestly Traefik is shit for a simple load balancer. It’s more suited for large enterprises and kubernetes services, but it also has numerous issues, such as basic auth performance issues, lack of headers customization as well as in overall somewhat difficult configuration. Caddy makes it straightforward & simple, which is perfect for simple users who love to self-host.

passepartout , to selfhosted in Stupid Question - Routing subdomains to various services on a single host.

What you need is a so called File Provider. The linked blog post seems to summarize this pretty good, at least better than the original docs.

You define your path as a “router” and the ip traefik should point to as “service”. Optionally, you can define all kinds of “middlewares”. Example:

<pre style="background-color:#ffffff;">
<span style="color:#323232;"># As YAML Configuration File
</span><span style="color:#323232;">http:
</span><span style="color:#323232;">  routers:
</span><span style="color:#323232;">    router1:
</span><span style="color:#323232;">      service: myService      <-- Edit: this should be service1, so it uses your defined service below
</span><span style="color:#323232;">      middlewares:
</span><span style="color:#323232;">        - "foo-add-prefix"
</span><span style="color:#323232;">      rule: "Host(`example.com`)"
</span><span style="color:#323232;">
</span><span style="color:#323232;">  middlewares:
</span><span style="color:#323232;">    foo-add-prefix:
</span><span style="color:#323232;">      addPrefix:
</span><span style="color:#323232;">        prefix: "/foo"
</span><span style="color:#323232;">
</span><span style="color:#323232;">  services:
</span><span style="color:#323232;">    service1:
</span><span style="color:#323232;">      loadBalancer:
</span><span style="color:#323232;">        servers:
</span><span style="color:#323232;">          - url: "http://127.0.0.1:80"
</span>

Help finding the right software.

I keep running my head into a wall working on a project and I am hoping you guys can help me. I have created a database that contains the addresses of contacts. What I need to accomplish is generating paper reports of these addresses. So, for example, I may have 25 addresses on one report related by some other data point. I...

TheInsane42 , to selfhosted in Help finding the right software.
@TheInsane42@lemmy.world avatar

Oh, 1st of all, I have to make a small correction, I use an odt as base document.

You run this in the directory with the odt file and a temp directory t

<pre style="background-color:#ffffff;">
<span style="color:#323232;">cd t
</span><span style="color:#323232;">unzip ../${document_template}.odt
</span><span style="color:#323232;">sed -i "s/ReplaceThis/${var1}/g" content.xml
</span><span style="color:#323232;">sed -i "s/ReplaceThisToo/${var2}/g" content.xml
</span><span style="color:#323232;">zip -r ../${document_target}.odt .
</span><span style="color:#323232;">cd ../
</span><span style="color:#323232;">libreoffice --headless --convert-to pdf:writer_pdf_Export ${document_target}.odt
</span>

The file content.xml is the actual text of the document, the rest is just the dressing (formatting). What you need to do is make sure the text you want to replace (ReplaceThis in the example) is unique apart from the spots where you want the text to be replaced. Check the content.xml to be sure, but be warned, the content.xml is a 2 line file with line 1 being the xml header. (it’s a terrible layout of the xml) Use an file editor you know well to find the words you want to replace. Also, be warned, correcting small typos in the odt results in garbage in the content.xml. You need to replace the whole word as 1 action. (Editing history has it’s uses, but is an issue here)

Instead of converting it to file you can print it as well. (DDG result)

<pre style="background-color:#ffffff;">
<span style="color:#323232;">libreoffice --headless --print-to-file --printer-name the_printer_name --outdir /tmp ${document_target}.odt
</span><span style="color:#323232;">lpr -U username /tmp/filename.ps -P the_printer_name
</span><span style="color:#323232;">rm /tmp/filename.ps
</span>
whou , to programmerhumor in Calling friends

okay, okay, I’ll declare it

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Friend[] myFriends() {
</span><span style="color:#323232;">    return {};
</span><span style="color:#323232;">}
</span>
addie , to linux in Linux Mint 21.2 "Victoria" is Now Available for Download, Here's What's New
@addie@feddit.uk avatar

Ha, hadn’t realised that I’ve been running the update Cinnamon all week already.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">$ pacman -Q cinnamon
</span><span style="color:#323232;">cinnamon 5.8.4-1
</span>

Seems extremely solid, ever more polished, and by far my favourite Linux desktop environment. Not so convinced by the additional xdg-desktop-portal integration - I’ve no flatpaks installed, so the only side-effect I’ve seen is the buggy behaviour where Firefox and Steam take forever to open until you disable as much as possible. That’s not on the Mint developers, though.

Following Red Hat's lead, Linus Torvalds will only publish Linux Kernel code to paid contributors (en.wikipedia.org)

At Linux, thousands of people spend their time writing code to enable new features, fixing bugs, integrating different packages and then supporting that work for a long time - something that our customers and partners need....

Raphael OP , (edited ) to linux in Following Red Hat's lead, Linus Torvalds will only publish Linux Kernel code to paid contributors
@Raphael@lemmy.world avatar

This is satire, here’s the original source:

redhat.com/…/red-hats-commitment-open-source-resp…

But this quote should speak to your soul:

I feel that much of the anger from our recent decision around the downstream sources comes from either those who do not want to pay for the time, effort and resources going into Linux or those who want to repackage it for their own profit. This demand for Linux code is disingenuous.

Linus never said this. But Red Hat Enterprise did.

This post was made with

<pre style="background-color:#ffffff;">
<span style="color:#323232;">%s/Linux/Windows/g
</span><span style="color:#323232;">%s/Red Hat/Linux/g
</span><span style="color:#323232;">%s/upstr/downstr/g
</span>
MrMonkey , to programmerhumor in i hate when this happens

Works the same as M-b for me (backwards-word)

Make sure your /etc/inputrc or ~/.inputrc contains

<pre style="background-color:#ffffff;">
<span style="color:#323232;"># mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
</span><span style="color:#323232;">
</span><span style="color:#323232;">"e[1;5C": forward-word
</span><span style="color:#323232;">
</span><span style="color:#323232;">"e[1;5D": backward-word
</span><span style="color:#323232;">
</span><span style="color:#323232;">"e[5C": forward-word
</span><span style="color:#323232;">
</span><span style="color:#323232;">"e[5D": backward-word
</span><span style="color:#323232;">
</span><span style="color:#323232;">"ee[C": forward-word
</span><span style="color:#323232;">
</span><span style="color:#323232;">"ee[D": backward-word`
</span>
grue , (edited ) to programmerhumor in i hate when this happens

Terminals with screens? What’s all that newfangled shit?

Nah, whippersnapper, this tech goes all the way back to teletypes. You didn’t get a fancy-shmancy “screen;” instead, it printed out the results of your commands. On actual paper!


Seriously though, that’s why the device files for terminals in Linux are named tty[$NUM] – “tty” is shorthand for “TeleTYpe.”

I believe it’s also why really primitive programs can’t scroll up and do things like writing an entire screen worth of content in order to emulate interactivity (as opposed to seeking the cursor backwards and replacing only the parts the program wants to replace): they’re using a version of the control protocol so primitive that it didn’t have a function to go backwards because teletypes didn’t need it due to physical impossibility. (That’s my theory, anyway – I haven’t dug deep enough into the guts of TERMCAP etc. to be sure. I’m also not actually old enough to have experienced that stuff, despite my joke above.)


Edit: look at this excerpt from man terminfo(5), for instance:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Basic Capabilities
</span><span style="color:#323232;">The number of columns on each line for the terminal is given by
</span><span style="color:#323232;">the cols numeric capability.  If the terminal is a CRT, then the
</span><span style="color:#323232;">number of lines on the screen is given by the lines capability.
</span><span style="color:#323232;">If the terminal wraps around to the beginning of the next line
</span><span style="color:#323232;">when it reaches the right margin, then it should have the am
</span><span style="color:#323232;">capability.  If the terminal can clear its screen, leaving the
</span><span style="color:#323232;">cursor in the home position, then this is given by the clear
</span><span style="color:#323232;">string capability.  If the terminal overstrikes (rather than
</span><span style="color:#323232;">clearing a position when a character is struck over) then it
</span><span style="color:#323232;">should have the os capability.  If the terminal is a printing
</span><span style="color:#323232;">terminal, with no soft copy unit, give it both hc and os.
</span>

To this day, the info database entry for your virtual terminal has to specify that it’s capable of deleting a line of text instead of merely striking it out, because some terminals back in the day actually couldn’t!

quitaxd , to technology in Reddit removes years of chat and message archives from users' accounts
@quitaxd@lemmy.world avatar
<pre style="background-color:#ffffff;">
<span style="color:#323232;">Reddit is sinking.
</span>
Die4Ever , to fediverse in The migration of large communities from Reddit to Lemmy is like a world-renowned band performing an acoustic set in a library for 50 people.
@Die4Ever@programming.dev avatar

this is the bash script I use to create backups

<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>

it creates very small zip files as a result so it’s very efficient

I made a cron for it to run every 3 hours, like

<pre style="background-color:#ffffff;">
<span style="color:#323232;">0 */3 * * * ~/lemmy/backup.sh
</span>
lyoko OP , to selfhosted in Templating engine for docker compose

I actually need more than merging. For example, right now my traefik.template will look like this:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">[http.routers.{{ router_name }}]
</span><span style="color:#323232;">  rule = "{{ router_rule }}"
</span><span style="color:#323232;">  service = "{{ service_name }}"
</span><span style="color:#323232;">  middlewares = [{{ middlewares | map("tojson") | join(", ") }}]
</span><span style="color:#323232;">{% block router %}{% endblock %}
</span><span style="color:#323232;">  [http.routers.{{ router_name }}.tls]
</span><span style="color:#323232;">    certResolver = "leresolver_http"
</span><span style="color:#323232;">
</span><span style="color:#323232;">{% if service_host is defined %}
</span><span style="color:#323232;">[[http.services.{{ service_name }}.loadBalancer.servers]]
</span><span style="color:#323232;">  url = "{{ 'https' if service_use_https is defined else 'http' }}://{{ service_host }}{{ ':' ~ service_port if service_port is defined else '' }}"
</span><span style="color:#323232;">{% endif %}
</span>

and then one of my traefik.toml could look like this

<pre style="background-color:#ffffff;">
<span style="color:#323232;">{% extends "template/traefik.jinja" %}
</span><span style="color:#323232;">
</span><span style="color:#323232;">{% set router_name = "dozzle" %}
</span><span style="color:#323232;">{% set router_rule = "Host(`dozzle.example.com`)" %}
</span><span style="color:#323232;">{% set service_name = "dozzle" %}
</span><span style="color:#323232;">{% set service_host = "dozzle" %}
</span><span style="color:#323232;">{% set service_port = 8080 %}
</span>
fing3r , to programmerhumor in What did you see?!

-deleted post-

<pre style="background-color:#ffffff;">
<span style="color:#323232;">-thanks, that actually worked!
</span>

If intelligent life is found in the universe will it change religion(s)?

…with the James Web Telescope looking for sources of artificial light to identify potential intelligent life, and the news this week of Perseverance searching for microbial life on Mars it feels like we are getting closer to a major discovery. But what - if anything - would it mean for the religions on Earth if life is proven...

number6 , to nostupidquestions in If intelligent life is found in the universe will it change religion(s)?
<pre style="background-color:#ffffff;">
<span style="color:#323232;">And if there's life on other planets, 
</span><span style="color:#323232;">then I'm sure that he must know,
</span><span style="color:#323232;">and he's been there once already
</span><span style="color:#323232;">and has died to save their Souls
</span>

Larry Norman, “In Another Land”, 1976

megane_kun , to RedditMigration in How do I get shreddit working on Linux ?

It might take a while before anything gets outputted. I think it might also be good if you try the –dry-run option first just so that you’d know what to expect.

Here’s a sample output from one of my runs. It’s already been scoured clean, so there’s nothing to do.

sample shreddit output for an account with no posts and comments

I usually just run it through a bash script with the relevant line being:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">./shreddit-linux -u ${uname} -p ${pword} $dryrun > "logs/${uname}_${tsstr}.log"
</span>

Where ${uname} and ${pword} are my username and password respectively, and $dryrun is either –dryrun or the empty string.

The output is then saved to a log file with the name pattern username_timestamp.

Also, I noticed that you’re using the gpdr-export option. I think there’s some wonkiness regarding that? I am not sure though. I still recommend using the –dryrun option first just to see what’s up (without actually doing any changes to your account.


EDIT:

I forgot to clarify, shreddit-linux is what I named the executable file I got from the repository.

How do I set Lemmy to fully expand images?

Right now, the only method I found is to click on the expando, then right click on the image and open it in a new tab. Is there a way to make it so I can just click it once? I can’t imagine any possible scenario where I’d want to see a large but not full size image....

_HR_ , to nostupidquestions in How do I set Lemmy to fully expand images?

This will allow maximum expansion, but will somewhat break display of the sidebar:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">.col-lg-9, .col-md-8 {
</span><span style="color:#323232;">    width: unset;
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">.container-lg, .container-md, .container-sm, .container {
</span><span style="color:#323232;">    max-width: unset;
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">.offset-sm-3 {
</span><span style="color:#323232;">    margin-left: unset;
</span><span style="color:#323232;">}
</span>

I’ve only tested with a few !pics posts, and couldn’t quickly find whether this would affect images in comments.

eth0p , to mildlyinfuriating in Updated my Samsung phone and it installed unwanted apps

Oh cool, there’s a 200mp camera. Something that only pro photographers care about lol.

Oh this is a fun one! Trained, professional photographers generally don’t care either, since more megapixels aren’t guaranteed to make better photos.

Consider two sensors that take up the same physical space and capture light with the same efficiency/ability, but are 10 vs 40 megapixels. (Note: Realistically, a higher density would mean design trade-offs and more generous manufacturing tolerances.)

From a physics perspective, the higher megapixel sensor will collect the same amount of light spread over a more dense area. This means that the resolution of the captured light will be higher, but each single pixel will get less overall light.

So imagine we have 40 photons of light:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">More Pixels    Less Pixels
</span><span style="color:#323232;">-----------    -----------
</span><span style="color:#323232;">1 2 1 5         
</span><span style="color:#323232;">2 6 2 3         11  11
</span><span style="color:#323232;">1 9 0 1         15  3
</span><span style="color:#323232;">4 1 1 1         
</span>

When you zoom in to the individual pixels, the higher-resolution sensor will appear more noisy. This can be mitigated by pixel binning, which groups (or “bins”) those physical pixels into larger, virtual ones—essentially mimicking the lower-resolution sensor. Software can get crafty and try to use some more tricks to de-noise it without ruining the sharpness, though. Or if you could sit completely still for a few seconds, you could significantly lower the ISO and get a better average for each pixel.

Strictly from a physics perspective (and assuming the sensors are the same overall quality), higher megapixel sensors are better simply because you can capture more detail and end up with similar quality when you scale the picture down to whatever you’re comparing it against. More detail never hurts.

… Except when it does. Unless you save your photos as RAW (which take a massice amount of space), they’re going to be compressed into a lossy image format like JPEG. And the lovely thing about JPEG, is that it takes advantage of human vision to strip away visual information that we generally wouldn’t perceive, like slight color changes and high frequency details (like noise!)

And you can probably see where this is going: the way that the photo is encoded and stored destroys data that would have otherwise ensured you could eventually create a comparable (or better) photo. Luckily, though, the image is pre-processed by the camera software before encoding it as a JPEG, applying some of those quality-improving tricks before the data is lost. That leaves you at the mercy of the manufacturer’s software, however.

In summary: more megapixels is better in theory. In practice, bad software and image compression negate the advantages that a higher resolution provides, and higher-density sensors likely mean lower-quality data. Also, don’t expect more megapixels to mean better zoom. You would need an actual lense for that.

z1n , to selfhosted in Q: Lemmy and Mastodon instances behind existing reverse proxy

My Nginx is pointing to the “proxy” container (the one with port 1236 in your docker compose).

My Nginx location looks something like the below. Obviously there is more for SSL termination etc. Let me know if this doesn’t make any sense.

TIP: I’m using 0.0.0.0 since 127.0.0.1 won’t work (I can explain this further if needs be).

<pre style="background-color:#ffffff;">
<span style="color:#323232;">location / {
</span><span style="color:#323232;">      proxy_pass http://0.0.0.0:1236;
</span><span style="color:#323232;">      proxy_http_version 1.1;
</span><span style="color:#323232;">      proxy_set_header Upgrade $http_upgrade;
</span><span style="color:#323232;">      proxy_set_header Connection "upgrade";
</span><span style="color:#323232;">      proxy_set_header X-Real-IP $remote_addr;
</span><span style="color:#323232;">      proxy_set_header Host $host;
</span><span style="color:#323232;">      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
</span><span style="color:#323232;">    }
</span>
_calm_bomb_ , to linux in How to make a command run everyday at a specific time?
@_calm_bomb_@lemmy.ml avatar

OK… So, just to test, edit your crontab and run a basic command:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">*/1 * * * * date >> ~/date.log
</span>

this will append the current date/time once a minute (*/1) to a file in your home dir. You can check if it works with cat ~/date.log

If that works, then try again with your command. I see you used the full path to it, that’s a good thing. Also, what does that command do if you run it manually?

To run the command at 10 PM every day, you should have it like this:

0 22 * * * /usr/bin/sct 2750

ablackcatstail , to selfhosted in ELI5 Cloudflare Tunnel
@ablackcatstail@lemmy.goblackcat.com avatar

I have not converted my home network to use split-brain yet and that’s because I only just recently got Let’s Encrypt to work with the DNS-01 challenge which verifies domain ownership via a TXT record. Now that the DNS-01 challenge works perfectly, I can use split-brain DNS to resolve my example.com requests to internal IP addresses. What I am currently doing is as follows and it is inefficient and ugly!

Local request —> Internet --> VPS Proxy --> WireGuard tunnel --> Local Server --> WireGuard tunnel -> VPS Proxy -> Internet --> Local origin

Now that I have Let’s Encrypt working using the DNS-01 challenge, there will be significantly less latency. It should look something like this:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Local request --> Local DNS Server --> Local Server --> Local request
</span><span style="color:#323232;">                                         |
</span><span style="color:#323232;">                                         --> Local Server --> WireGuard Tunnel --> Internet
</span>

I hope this is helpful! This will reduce the amount of locally generated traffic that must transit the VPN tunnel bi-directionally.

ablackcatstail , to selfhosted in ELI5 Cloudflare Tunnel
@ablackcatstail@lemmy.goblackcat.com avatar

Here is a sample configuration that should work for you:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">server:
</span><span style="color:#323232;">        interface: 127.0.0.1
</span><span style="color:#323232;">        interface: 192.168.1.1
</span><span style="color:#323232;">        do-udp: yes
</span><span style="color:#323232;">        do-tcp: yes
</span><span style="color:#323232;">        do-not-query-localhost: no
</span><span style="color:#323232;">        verbosity: 1
</span><span style="color:#323232;">        log-queries: yes
</span><span style="color:#323232;">
</span><span style="color:#323232;">        access-control: 0.0.0.0/0 refuse
</span><span style="color:#323232;">        access-control-view: 127.0.0.0/8 example
</span><span style="color:#323232;">        access-control-view: 192.168.1.0/24 example
</span><span style="color:#323232;">
</span><span style="color:#323232;">        hide-identity: yes
</span><span style="color:#323232;">        hide-version: yes
</span><span style="color:#323232;">        tcp-upstream: yes
</span><span style="color:#323232;">
</span><span style="color:#323232;">remote-control:
</span><span style="color:#323232;">        control-enable: yes
</span><span style="color:#323232;">        control-interface: /var/run/unbound.sock
</span><span style="color:#323232;">
</span><span style="color:#323232;">view:
</span><span style="color:#323232;">        name: "example"
</span><span style="color:#323232;">        local-zone: "example.com." inform
</span><span style="color:#323232;">        local-data: "example.com. IN A 192.168.1.2"
</span><span style="color:#323232;">        local-data: "www IN CNAME example.com."
</span><span style="color:#323232;">        local-data: "another.example.com. IN A 192.168.1.3"
</span><span style="color:#323232;">
</span><span style="color:#323232;">forward-zone:
</span><span style="color:#323232;">        name: "."
</span><span style="color:#323232;">        forward-addr: 8.8.8.8
</span><span style="color:#323232;">        forward-addr: 8.8.4.4
</span>

What makes the split-brain DNS work is if the request for resolution comes from the localhost or from inside your network, it will first go to the view section to see if there is any pertinent local data. So if you do a query from your home network, on say, example.com, it will return your internal IP address which in this case is 192.168.1.2

defensor_fortis , to sysadmin in Fortinet warns of critical RCE flaw in FortiOS, FortiProxy devices

There’s been issues with the WAD process using up memory until the unit goes into conserve mode since I was on 6.0.6. I started running a script to restart the process twice daily and have never had a problem since. I just upgraded from 6.4.13 to 7.0.12 a few weeks ago and I’ve left the script to run on every upgrade since 6.0.6. I’ve never disabled it to see if I don’t need it any longer, maybe I should.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">config system auto-script
</span><span style="color:#323232;">    edit "restart_wad"
</span><span style="color:#323232;">        set interval 43200
</span><span style="color:#323232;">        set repeat 360
</span><span style="color:#323232;">        set start auto
</span><span style="color:#323232;">        set script "diag test app wad 99"
</span><span style="color:#323232;">    next
</span><span style="color:#323232;">end
</span>
TauZero , to askscience in Tell me about the physics of material "falling onto a neutron star and emitting hard x-rays"

As a quick calculation using the Boltzman formula:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">E = 3/2 k_B T
</span>

Say we imagine that the entire kinetic energy of bulk material from Earth (let’s say iron) impacting the star at 10000km/s is converted into thermal kinetic energy of individual iron atoms (atomic weight 56).

<pre style="background-color:#ffffff;">
<span style="color:#323232;">1/2 m v**2 = 3/2 k_B T
</span><span style="color:#323232;">T = 1/3 m v**2 / k_B
</span><span style="color:#323232;">k_B = 1.38e-23 J/K
</span><span style="color:#323232;">m = 0.056 kg / 6.02e23
</span><span style="color:#323232;">v = 1e7 m/s
</span><span style="color:#323232;">T = 1/3 * .056/6.02e23 * 1e7**2 / 1.38e-23
</span><span style="color:#323232;">
</span><span style="color:#323232;">T = 225 GK
</span>

Looking at the black body temperature chart that 225 gigakelvin corresponds precisely to gamma rays from neutron star collisions.

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