Never wrote RPM specs because I generally dislike RPM-based distributions (Fedora was a really bad experience when I tried it), but from a quick Google search they’re very similar.
I kinda like the format at a glance, seems pretty comparable in terms of what you put in there. Definitely less painful than debhelper.
I guess one of the advantages of PKGBUILD is that they’re essentially bash scripts that gets sourced by the tools, so they’re incredibly simple and don’t require parsing a custom format. You can:
That comes with disadvantages in that reading the PKGBUILD is inherently unsafe, and it was the cause of many concerns back in the days with tools like yaourt, which pretty much just blindly sourced it to get the variables out, which means immediate code execution just loading it from the AUR.
For quite some time now, KDE has intermittently been unable to go to sleep. It will either go to a black screen with the cursor still showing, and the computer running, or it will show a half frozen sddm looking screen with the computer still running. The computer, in both cases, will be wholly unresponsive, and the only way to...
It seems like for at least a decade every application/framework has had their own paste buffer, and honestly I’m surprised this isn’t “just working” out of the box by now....
Others have covered PRIMARY vs CLIPBOARD (the separation of which I find to be extremely useful).
For Vim, you have access to these both via the registers + (CLIPBOARD) and * (PRIMARY). So, for example, to paste from your CLIPBOARD selection, you’d do this:
I’m looking to create an image gallery, to show images I have taken. Is there any software that would be great for this? I am open to any suggestions....
TL;DR: fgallery is a dumb static web gallery generator: EXAMPLE, SETUP.
There’s fgallery which is a small Debian package that takes an input directory (e.g. photo-dir) and creates a static website in a new directory (e.g. my-gallery).
“fgallery” is a static photo gallery generator with no frills that has a stylish, minimalist look. “fgallery” shows your photos, and nothing else.
There is no server-side processing, only static generation. The resulting gallery can be uploaded anywhere without additional requirements and works with any modern browser.
Among all the Debian packages similar to this one, this seems the most recently maintained (version 1.9.1 came out 2022-12-31). It is licensed GPLv2+ so the source code is available.
Upload to a web server
After running fgallery as described above, upload my-gallery to your static web page directory (e.g. /var/www/html/ with a typical apache2 setup) and open the index.html through a web browser.
( https://commons.wikimedia.org/wiki/File:Portland_Japanese_Garden_Tanabata_tanzaku.jpg by Baltakatei / 🅭🅯🄎 4.0 )
Viewing locally with a browser
To view the gallery locally without uploading to a web server (e.g. a Digital Ocean droplet) or static content hosting service (e.g. AWS S3), you can do so with your own web browser. However, because the fgallery webpage uses Javascript and since modern browsers refuse to render Javascript in HTML pages at local file system addresses (e.g. file:///) due to same-origin policy, the easiest solution is to make a simple webserver via python3:
Then, you can visit the my-gallery/index.html file via a local http:// address at http://localhost:8000/.
Summary
fgallery lacks many complex features (no image database, no metadata editing, no dynamic server processes for editing images, etc.). However, I’d argue its lack of features is the main feature. It just takes a directory of photos and spits out a directory you can plug into your hosting service. Updating the the gallery is just a matter of running the same $ fgallery photo-dir my-gallery command again and re-uploading.
The way I remember the order is that the parentheses around the link would make grammatical sense outside of markdown (the goal of markdown is to still be fully readable even when looking at the raw source).
For example if I were posting on a forum that didn’t have markdown support which one of these would make more sense:
You can find that on this lemmy instance (https://lemmy.world).
You can find that on (this lemmy instance) https://lemmy.world.
Option 2 makes no sense grammatically. Then you just need to use the square brackets (which rarely show up in non-markdown text) to denote the link range.
Alternatively, if you still have a hard time remembering the order, you can use reference-style links which make it even more readable outside of markdown rendered contexts (note that there are no parentheses in this version, nothing to get confused):
<pre style="background-color:#ffffff;">
<span style="color:#323232;">[Here is a link][1] and [here is another link][2].
</span><span style="color:#323232;">
</span><span style="color:#323232;">[1]: http://example.org
</span><span style="color:#323232;">[2]: http://example.com
</span>
<pre style="background-color:#ffffff;">
<span style="color:#323232;">We drive our cars and planes
</span><span style="color:#323232;">And burn the fossil fuels
</span><span style="color:#323232;">We ignore the scientists
</span><span style="color:#323232;">And call them climate fools
</span><span style="color:#323232;">
</span><span style="color:#323232;">We chop down all the forests
</span><span style="color:#323232;">And fill the seas with trash
</span><span style="color:#323232;">We melt the polar ice caps
</span><span style="color:#323232;">And watch the glaciers crash
</span><span style="color:#323232;">
</span><span style="color:#323232;">We suffer and we will die
</span><span style="color:#323232;">From the heat as we get older
</span><span style="color:#323232;">But hey, at least we created a lot of value
</span><span style="color:#323232;">For our dear shareholders
</span>
I’m not exactly a linux beginner but I’m far from an expert and I could use some pointers. I have a domain and a VPS through Namecheap, I chose Ubuntu 20.04 LAMP and I’ve tried several guides to get this working but something always goes wrong sooner or later....
<pre style="background-color:#ffffff;">
<span style="color:#323232;"> # actual and only port facing any connection from outside
</span><span style="color:#323232;"> # Note, change the left number if port 1236 is already in use on your system
</span><span style="color:#323232;"> # You could use port 80 if you won't use a reverse proxy
</span><span style="color:#323232;"> - "80:8536"
</span>
this fails with Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use
I tried 8080 instead and got no errors but I wasn’t able to load the Lemmy page.
I can now get the “Apache2 Ubuntu Default Page - It works!” So that’s something.
If you were using Zsh, one way you could do this is by autoloading function files from a folder in your fpath.
Let’s say you’re using ~/.local/share/zsh/site-functions for your custom functions. To ensure that folder is an early part of your fpath, put something like this within your .zshrc:
Explanation for the second =:=’ expansion If a word begins with an unquoted =’ and the EQUALS option is set, the remainder of the word is taken as the name of a command. If a command ex‐ ists by that name, the word is replaced by the full pathname of the command.
The last thing you need to do is mark it for autoloading, in your .zshrc:
Instead of listing those functions manually as arguments, you could instead use a glob pattern to collect all those names, excluding any which begin with _ (completion functions):
Today I decided to get an inexpensive custom domain from Namecheap and try self-hosting Lemmy. A few bucks later I was thinking, “Hey, this is going to be cake.”...
This series of commands installed an official docker repository in your system so docker itself is always up-to-date, Ubuntu gets updates like this kinda slowly.
curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt’ | tee /etc/apt/sources.list.d/caddy-stable.list
apt update
apt install caddy
Edit the file /etc/caddy/Caddyfile (for example using nano /etc/caddy/Caddyfile)
Paste this content (replace domain.tld with your Lemmy instance domain and the 1236 with the port you have configured in the docker-compose.yml file for {{ lemmy_port }}):
Ah, maybe I wasn’t clear enough, caddy doesn’t need a configuration to redirect traffic from port 80 to port 443, it does it automatically: caddyserver.com/docs/automatic-https
If you want to configure an http only site you need to specifically configure it in your Caddyfile.
Here’s an example for a reverse proxy
<pre style="background-color:#ffffff;">
<span style="color:#323232;"># We don't specify the protocol so Caddy assumes HTTPS and redirects any HTTP to secure.
</span><span style="color:#323232;">secure.example.com { reverse_proxy :<port> }
</span><span style="color:#323232;">
</span><span style="color:#323232;"># HTTP is specified so Caddy won't redirect to port 443 nor generate a certificate.
</span><span style="color:#323232;">http://insecure.example.com { reverse_proxy :<port> }
</span>
There have been a few Reddit, Lemmy and Youtube posts over the past week or so about Nginx Proxy Manager and their shortfalls, mostly towards CVEs and other security issues....
<pre style="background-color:#ffffff;">
<span style="color:#323232;">Comment videos
</span><span style="color:#323232;">Subscribe to channels to be notified of new videos
</span><span style="color:#323232;">Have access to your watch history
</span><span style="color:#323232;">Create your channel to publish videos
</span>
Although you should be able to follow specific platforms via something like mastodon
Did people even bother reading the article? A medical exam is literally one of the ways listed to skip the period if a woman does not want to wait:
<pre style="background-color:#ffffff;">
<span style="color:#323232;">The period can be dismissed if the woman agrees to undergo a medical examination to prove she is not pregnant or if she remarries her ex-husband. The period also ends if a woman gives birth.
</span>
For instance, I’m on Jury Duty in the US this week. Kinda a freebie but I still have to call in and input my “ID” number, birthday, and zip code before entering phone tree options to hear my summons status. So I saved a contact in my phone for the jury hotline with the main number, my Id number, birthday, zip code, and...
<pre style="background-color:#ffffff;">
<span style="color:#323232;">Second failure launching org.mozilla.firefox/org.mozilla.fenix.customtabs.ExternalAppBrowserActivity, giving up
</span><span style="color:#323232;">android.os.TransactionTooLargeException: data parcel size 614820 bytes
</span><span style="color:#323232;"> at android.os.BinderProxy.transactNative(Native Method)
</span><span style="color:#323232;"> at android.os.BinderProxy.transact(BinderProxy.java:571)
</span><span style="color:#323232;"> at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:2746)
</span><span style="color:#323232;"> at android.app.servertransaction.ClientTransaction.schedule(ClientTransaction.java:136)
</span><span style="color:#323232;"> at com.android.server.wm.ClientLifecycleManager.scheduleTransaction(ClientLifecycleManager.java:47)
</span><span style="color:#323232;"> at com.android.server.wm.ActivityTaskSupervisor.realStartActivityLocked(ActivityTaskSupervisor.java:880)
</span><span style="color:#323232;"> at com.android.server.wm.RootWindowContainer.startActivityForAttachedApplicationIfNeeded(RootWindowContainer.java:2000)
</span><span style="color:#323232;"> at com.android.server.wm.RootWindowContainer.$r8$lambda$auelgeOhCvbItmS_07q5VFEb1ac(Unknown Source:0)
</span><span style="color:#323232;"> at com.android.server.wm.RootWindowContainer$$ExternalSyntheticLambda2.apply(Unknown Source:8)
</span><span style="color:#323232;"> at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:318)
</span><span style="color:#323232;"> at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:204)
</span><span style="color:#323232;"> at com.android.internal.util.function.pooled.OmniFunction.apply(OmniFunction.java:78)
</span><span style="color:#323232;"> at com.android.server.wm.ActivityRecord.forAllActivities(ActivityRecord.java:4270)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllActivities(WindowContainer.java:1430)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllActivities(WindowContainer.java:1423)
</span><span style="color:#323232;"> at com.android.server.wm.RootWindowContainer.lambda$attachApplication$15$RootWindowContainer(RootWindowContainer.java:1978)
</span><span style="color:#323232;"> at com.android.server.wm.RootWindowContainer$$ExternalSyntheticLambda20.accept(Unknown Source:6)
</span><span style="color:#323232;"> at com.android.server.wm.Task.forAllRootTasks(Task.java:3197)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllRootTasks(WindowContainer.java:1806)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllRootTasks(WindowContainer.java:1806)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllRootTasks(WindowContainer.java:1806)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllRootTasks(WindowContainer.java:1806)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllRootTasks(WindowContainer.java:1806)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllRootTasks(WindowContainer.java:1806)
</span><span style="color:#323232;"> at com.android.server.wm.WindowContainer.forAllRootTasks(WindowContainer.java:1799)
</span><span style="color:#323232;"> at com.android.server.wm.RootWindowContainer.attachApplication(RootWindowContainer.java:1964)
</span><span style="color:#323232;"> at com.android.server.wm.ActivityTaskManagerService$LocalService.attachApplication(ActivityTaskManagerService.java:6041)
</span><span style="color:#323232;"> at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4595)
</span><span style="color:#323232;"> at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4676)
</span><span style="color:#323232;"> at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2404)
</span><span style="color:#323232;"> at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2517)
</span><span style="color:#323232;"> at android.os.Binder.execTransactInternal(Binder.java:1179)
</span><span style="color:#323232;"> at android.os.Binder.execTransact(Binder.java:1143)
</span>
Damn that setup is no joke. 21GB in a few months initially sounded like a lot to me… but I decided to math it out. Lets say the 20gb was across 1,2 or 3 months…
<pre style="background-color:#ffffff;">
<span style="color:#323232;">Time till 1tb would fill up.
</span><span style="color:#323232;">+------+-----------+----------+----------+
</span><span style="color:#323232;">| | 3 months | 2 months | 1 month |
</span><span style="color:#323232;">| 1 TB | ~12 years | ~8 years | ~4 years |
</span><span style="color:#323232;">+------+-----------+----------+----------+
</span>
That data usage is looking pretty reasonable… Even 20gb per month is something that wouldn’t be too hard to keep up with and I’m sure eventually there’ll be a way to clean up old posts that no one on your instance saved or commented on if you are trying to save space. I’d start to worry if disk usage was hitting closer to 40gb a month.
What is the advantage of PKGBUILD over RPM specs?
KDE freezes when going to sleep/suspending
For quite some time now, KDE has intermittently been unable to go to sleep. It will either go to a black screen with the cursor still showing, and the computer running, or it will show a half frozen sddm looking screen with the computer still running. The computer, in both cases, will be wholly unresponsive, and the only way to...
Why is copy and paste so difficult for Linux to solve?
It seems like for at least a decade every application/framework has had their own paste buffer, and honestly I’m surprised this isn’t “just working” out of the box by now....
What is the best way to create a image gallery website?
I’m looking to create an image gallery, to show images I have taken. Is there any software that would be great for this? I am open to any suggestions....
France passes bill to allow police remotely activate phone camera, microphone, spy on people (gazettengr.com)
Anyone using rustic? (github.com)
Hey, you probably know about restic and borg for backups. They are pretty mature and very commonly used....
Why are so many climate records breaking all at once? (theconversation.com)
No luck getting my Lemmy instance up and running, is this a good place to get some help?
I’m not exactly a linux beginner but I’m far from an expert and I could use some pointers. I have a domain and a VPS through Namecheap, I chose Ubuntu 20.04 LAMP and I’ve tried several guides to get this working but something always goes wrong sooner or later....
How to make it such that, when running `command`, it automatically does `SOME_ENV_VAR=value command`? (something cleaner than aliases?)
hello friends,...
In over my head
Today I decided to get an inexpensive custom domain from Namecheap and try self-hosting Lemmy. A few bucks later I was thinking, “Hey, this is going to be cake.”...
If humans were born with 6 fingers on each hand we would be using base 12 instead of the decimal system.
New Lemmy Server - Get all communities
I have a new Lemmy server (lemmy.todayyoutomorrow.me) and I’ve noticed only communities I subscribe to show up....
NPM vs Traefik?
There have been a few Reddit, Lemmy and Youtube posts over the past week or so about Nginx Proxy Manager and their shortfalls, mostly towards CVEs and other security issues....
The new captcha to prove you're a human should be "say something inappropriate or offensive"
I Guess They Don’t Watch Lower Decks (bgr.com)
If we’ve Learned anything from Lower Decks it’s that giving Clippy an AI might not be a great idea.
Youtube alternatives | Foss and privacy centered alternatives
cross-posted from: lemmy.world/post/1057347...
Can we finally put this one to rest? (lemmy.world)
Originally posted on reddit seven months ago.
In Turkey, women must wait 300 days before they remarry (globalvoices.org)
YSK: Commas can be used in phone numbers to automatically input automated menu options
For instance, I’m on Jury Duty in the US this week. Kinda a freebie but I still have to call in and input my “ID” number, birthday, and zip code before entering phone tree options to hear my summons status. So I saved a contact in my phone for the jury hotline with the main number, my Id number, birthday, zip code, and...
YSK: you should use this lemmy link switcher script (via violentMonkey) (greasyfork.org)
This script transforms links from other instances to your home instance. So useful :)...
Well well 🤨 (sh.itjust.works)
Your best terminal aliases
What are your most liked alias for long commands or just to give them better names....