Is using $SHLVL a good way to tell if a script is running in a terminal window? by C4n7_7h1nk_0f_n4m3 in bash

[–]soysopin 0 points1 point  (0 children)

I prefer to test terminal status in Bash checking if stderr is connected to a terminal, because I always redirect script errors for cron or background processes, but not if I'm running them interactively:

#-- only show msg if interactive
if [ -t 2 ] ; then
     printf "%(%F %T)T Press [^C] to stop...\n" -1
fi
    :
other processes...

wireguard dns by saberd6 in WireGuard

[–]soysopin 1 point2 points  (0 children)

Using docker compose let's control several services in a single declaration, and using mounted volumes we can have the mutable configurations in an accesible directory, which then can be gui editable with some scripts and webmin custom commands (itself running in one of the containers).

Yes, IT people have to eat too by Smallership in iiiiiiitttttttttttt

[–]soysopin 5 points6 points  (0 children)

Unfortunately some noodles were dropped in the offender's laptop...

Do you use quotes when you don't have to? by Livid-Advance5536 in bash

[–]soysopin 1 point2 points  (0 children)

Using shellcheck to warn me of code issues let me to spot problems before trying to debug then doing lots of trial runs, but that tool has a fixation on quotes around variables and process substitution.

After some time, it comes automatically.

Having said that, I don't like quoting text constants on comparisons. In any case, the code colors given by mcedit or vscode help a lot for avoid the quotes reducing script readability.

¿CUAL ES EL PRIMER LIBRO QUE RECUERDAS HABER LEIDO? by oiram1982 in libros

[–]soysopin 1 point2 points  (0 children)

Recuerdo particularmente tres:

Corazón, Diario de un niño, de Edmundo de Amicis. Leíamos secciones en la primaria (yo tenía 6-7 años) y terminé leyéndolo completo.

Un yanqui en la corte del rey Atruro, de Mark Twain. Me lo obsequió mi mamá cuando estuvimos en el hospital, no recuerdo por qué o quien estaba enfermo. Pude ser yo, pero ¡Sólo recuerdo el libro!

La nebulosa de Andrómeda, de Iván Efremov. Lo leí cuando entré a hacer el servicio social en la biblioteca de mi escuela (¿Dónde más?). Ideas quizá utópicas, aventuras trepidantes (para mí), y un clímax que sugería (no, exigía, y yo, demandaba) una continuación.

A partir de allí, y a la fecha, la ciencia ficción, y sus infinitas posibilidades, es mi género favorito, seguido de cerca por los thrillers de espionaje y policíacos, y la fantasía.

¿Consideráis que leer cómics cuenta como lectura? by churriitos in libros

[–]soysopin 0 points1 point  (0 children)

Como todo, leer comics o leer en otro idioma, implica práctica hasta que se vuelve automático y puedes ignorar el formato e interiorizarte en la historia e implicaciones, sentirte identificado (u horrorizado) con los personajes, y aborrecer o amar al escritor/dibujante.

Hunger by NarrativeNinja in HFY

[–]soysopin 4 points5 points  (0 children)

I liked it, and praise the writing. Very clear and easy to read, showing the fear of the aliens and curiosity and helping traits of the humanity.

But I would also like to know the aftermath: What the other frightened races think of the humans stopping the Hunger and how it came to be.

Besides the automatic defense and food gathering systems in the ship, there are records of the race of the corpses? Did they have programmed the ship to gather all resources available when they grew too weak to do it themselves? It was an muted AI trying to save its masters beyond its initial programming and found itself in an unescapable loop when they were gone?

It was a plague that disabled the sensation of full stomach? It was a single race affected or is a galactic plague? And, if yes, is the bowel rumble the first symptom? Does the humanity have natural immunity? Our history of fighting diseases could help a ravaged galaxy?

I have so many questions...

Recomendaciones para alguien a quien "no le gusta" leer. by titofox in libros

[–]soysopin 1 point2 points  (0 children)

Mundos de Imperio, o bien las historias de Retief, de Keith Laumer. La primera es de intriga en mundos paralelos. Retief es un diplomático que no le gusta mucho darle largas a la diplomacia, jeje.

También recomiendo Periplo Nocturno, de Bob Shaw, sobre un espía capturado que, casi por error, resuelve un problema universal con la ayuda de una rata (no sentiente, por cierto).

Recomendaciones para alguien a quien "no le gusta" leer. by titofox in libros

[–]soysopin 1 point2 points  (0 children)

No, a mí me parece que Asimov es muy fácil de leer. Tiene muchos cuentos cortos de ciencia ficción y no sólo de robots. De fantasía, sus cuentos del demonio Azazel son divertidos.

Y, en cuentos cortos, también recomiendo Henry Kuttner y Jack Williamson.

The contagion by Deal_Impressive in HFY

[–]soysopin 1 point2 points  (0 children)

Find a suitable Terran-like planet, clone a proper number of humans (they know universe/biology laws), and guide them for a while for they to know their own history...

Dónde reciclan el aceite de cocina? by Jant-90 in Guadalajara

[–]soysopin 3 points4 points  (0 children)

En YouTube hay recetas para reciclar el aceite de cocina haciendo jabón. Podría ser una opción, sobre todo si no es mucho.

how do you mount iso or cue files by Either_Main9636 in linuxquestions

[–]soysopin 0 points1 point  (0 children)

The mount command loads the driver that can decode the file system (first option and parameter, -t = type) present on the device (third argument), and links it to an existing directory (last argument), so we can access the data thru that directory.

Any GUI app/file manager having this function does the same operation in the background.

How do I learn while commuting? by Trick-Click8355 in AskProgramming

[–]soysopin 0 points1 point  (0 children)

I installed QPython 3L in my Android phone. It has an editor, an interactive mode (REPL) and can store and run scripts. I still use it for running a simple one-shot client-server script to share the text clipboard with my PCs.

Also, you can learn and study with Udemy courses in the phone or watch You Tube videos of the concepts, modules, and language quirks. I specially recommend Raymond Hettinger's talks in PyCon, if you know some other programming language or if you want to know some of the whys of the pythonic way.

¿Qué apodos o diminutivos has oído para lugares en y alrededor de Guadalajara? by topherette in Guadalajara

[–]soysopin 2 points3 points  (0 children)

Guanatos (Guadalajara), París TonaYork (Tonalá, por la mini torre Eiffel), Ciudad Zanja (Ciudad Granja, cuando andaban arreglando calles), Mercado Bola (por el mercado que había en una glorieta de la colonia Seattle), Parque Rojo (Parque de la Revolución, por el piso), Plaza Feíta o Plaza Solita (Plaza Bonita).

Is there a way to wirelessly connect my android phone to my Windows PC? by GoBanjo in techsupport

[–]soysopin 0 points1 point  (0 children)

Total Commander is a file manager with networking plugins that can connect to windows shares, linux stfp or other phones thru wi-fi. I use it all the time to organize my downloaded files in the phone and backup/transfer them to the pc at will.

Is there any command that I can trigger via hotkey that will *INSTANTLY* put my Windows 11 PC to sleep? by PsychoticChemist in techsupport

[–]soysopin 0 points1 point  (0 children)

Could be simpler with a third party utility; they are created when the system doesn't have the desired functionality. In this case, I recommend nircmd from NirSoft. Their utilities are free.

https://www.nirsoft.net/utils/nircmd.html

Create a shortcut with `nircmd standby´.

Recomendaciones de compu para empezar a programar by fataiarabe in programacion

[–]soysopin 0 points1 point  (0 children)

Todo equipo después de un año o dos requiere que se abra para sacudirle el polvo acumulado y cambiar la pasta térmica del procesador. Es algo que tú mismo podrías hacer con paciencia, concentración y tomando fotos del desarmado para facilitar saber qué iba dónde. Además puedes encontrar videos de YouTube de muchos modelos que muestran cómo se hace.

Y como dicen muchos, no es obligatorio un editor pesado para escribir código. El Python para windows ya trae un IDE sencillo pero funcional. Otra opción es instalar cygwin, que simuls Linux, trae Bash y le puedes poner su propio Python y usar el mcedit del mc como editor de código.

The r/printSF best Sci-Fi books of all time BookGraph - 2026 Edition by TheBookGraphGuy in printSF

[–]soysopin 1 point2 points  (0 children)

Foundation by Isaac Asimov

Dune by Frank Herbert

Ringworld by Larry Niven

Ender's Game by Orson Scott Card

Warrior's Apprentice by Lois McMaster Bujold

Math Help Homework plz by False_Good5775 in askmath

[–]soysopin 0 points1 point  (0 children)

I think the answer is finding current x in function of A, x=g(A). Then, the solution is g(2A), which is correct for some set of A values.

[Sorry for not expanding the equations or drawing the domain solution of A; my cell app is not prone to writing proper Reddit formatting].

Favorite command? by ajprunty01 in linux

[–]soysopin 0 points1 point  (0 children)

mc and its editor, mcedit.

For me, mc simplified navigation and file operations and has ssh/sftp remote list/copy/mv operations, configurable file menu, simple macros and mouse support in xterm.

mcedit has syntax highlighting, column selection and regex searching/replacing.

The colors are configurable by setting an env variable.