• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "advice". Back to normal view / Search all groups
    1. Anybody have experience writing a scripting language?

      Hello, I've had two ideas for games I find pretty compelling, and both would require different custom scripting languages. Unfortunately, I don't have any formal CS education or experience with...

      Hello, I've had two ideas for games I find pretty compelling, and both would require different custom scripting languages. Unfortunately, I don't have any formal CS education or experience with parsing or scripting languages. So, I'm feeling a bit lost and thinking it'd be a herculean effort, is that correct?

      Has anyone here written their own language or DSL and have any insights, resources, or starting points to share?

      8 votes
    2. Uninterruptible Power Supply (UPS) recommendations and advice

      Hello everyone, I usually do my own research, and then I try to find multiple matching results and afterwards, read specifically in detail about each recommendation, but, I have to be honest that...

      Hello everyone,

      I usually do my own research, and then I try to find multiple matching results and afterwards, read specifically in detail about each recommendation, but, I have to be honest that for UPS recommendations that I’ve seen, it seems to be a very personal recommendation depending on the wattage and connected devices.

      First of all, most people recommend CyberPower or APC, but I’ve also seen some recommendations for Eaton. Is there any other brand that I should be looking into?

      The devices I would like to connect to a UPS would be: desktop, TV, Apple TV, NAS, router and probably my Nintendo Switch.

      There are some general things I've found out while searching that I think I would like some confirmation:

      • I actually think I should buy two UPS's, or? I think just one for the desktop and another one just for the remaining devices, since the desktop uses a lot more wattage.
      • Pure Sine Wave: It does not matter for smaller stuff (routers, etc) but it seems that anything above 70 W, it should use a UPS with this. So, that would mean I need pure sine wave, since my desktop and TV definitely use more than 70 W of power.
      • Some people said to search for a UPS with line conditioning so that you always get a perfect sine wave. Would you agree?
      • USB connection (not a faux USB!) so that the NAS detects the power failure and shuts down gracefully.
      • It is important that the UPS has removable battery for better longevity.

      How would I choose a UPS? Do I need to see the total wattage of all my devices and then pick the UPS accordingly? Anything I'm missing?

      My budget would be up to €100 or €150 in case it is really worth it.

      Thank you in advance for all replies.

      13 votes
    3. Would this be alright for a NAS?

      Right now I've got a shitty WD EX4100 and everything was sort of running along nicely with docker and all, but today it rebooted and decided that it didn't want to do anything with docker anymore....

      Right now I've got a shitty WD EX4100 and everything was sort of running along nicely with docker and all, but today it rebooted and decided that it didn't want to do anything with docker anymore. I got the thing before I got into Linux and its time to move on.

      Someone locally is selling the following for $250CAD

      • Quad core Celeron @ 2Ghz
      • 8GB RAM
      • Fractal Node 304 case
      • 2x WD 2TB Red 3.5" hard drives
      • 120GB Kingston SSD
      • 700 watt semi-modular power supply

      All I run are the following:

      • nzbget
      • sonarr
      • qbittorrent (but I'll switch to a better one)
      • serve up content to my HTPC (running Kodi, so no transcoding or anything)

      I don't need the drives that come with it. I'll be putting in 4x 4TB WD Reds. Right now the box is running Open Media Vault 6, so I'll give that a swing, otherwise it'll just be Ubuntu server.

      How does this sound? I'm not opposed to spending some money on a new NAS, I just want something simple that I don't have to fuck around with too much.


      I ended up going with the HP Proliant

      OS: Ubuntu 20.04.3 LTS x86_64
      Host: ProLiant ML310e Gen8
      Kernel: 5.11.0-43-generic
      CPU: Intel Xeon E3-1230 V2 (8) @ 3.700GHz
      GPU: 01:00.1 Matrox Electronics Systems Ltd. MGA G200EH
      Memory: 32GB
      

      It's pretty good so far. Thanks everybody!

      8 votes
    4. Spiders

      Is anyone here familiar with crawling the web? I’m interested in broad crawling, rather than focusing on particular sites. I’d appreciate pretty much any information about how this is usually...

      Is anyone here familiar with crawling the web? I’m interested in broad crawling, rather than focusing on particular sites. I’d appreciate pretty much any information about how this is usually done, and things to watch out for if attempting it.

      10 votes
    5. How would you write a GUI? Seeking opinions, recommendations, and what to avoid.

      Hi all. I am asking this open-ended question (bottom of this post) because I am considering making contributions to an open-source project that would directly benefit me and other users. Some...

      Hi all. I am asking this open-ended question (bottom of this post) because I am considering making contributions to an open-source project that would directly benefit me and other users.

      Some background:

      I have worked with an engineering simulation software called Ansys MAPDL basically everyday for the last 4 years, in both an academic and a professional capacity. It's not necessarily relevant whether you are familiar to that program to participate in this discussion. The relevant thing is that the GUI for MAPDL is written in Tcl/Tk and I don’t imagine it is going to be modernized (because of more modern, but distinctly different, replacements). This is a screenshot of the GUI for reference.

      Why do people put up with such an old interface?

      The power of the program is not its GUI, but the scripting language that can be run to setup and solve simulations. The program name is really the scripting language name, Ansys Parametric Design Language (APDL). It's somewhat like Matlab. The program also offers an enormous amount of control when compared to the more modern GUI that's been released, since the modern GUI holds a totally different philosophy.

      The older GUI is really helpful in certain circumstances because it will spit out a file containing commands that were used in the session. This is a great demonstration of how to run a command or use a setting/config command, but a lot of newer features are buried in the documentation and aren't available in the older GUI.

      My coding experience

      I know the MAPDL language very intimately, but my experience beyond it is limited to some Perl scripting, and a bit of Python exposure.

      Motivation

      Open-Source Ansys API

      Recently, Ansys started supporting an open-source Python project called PyAnsys. MAPDL is otherwise fully closed source, and this is really the only public-facing API. PyAnsys has basically converted a lot of MAPDL script commands to a pythonic format, hence Python can now be used to interact with MAPDL. This is great for several reasons, but is limited regarding interactivity. Interacting with MAPDL via Python is basically happening in a fancy console via Jupyter notebook or IDE like Spyder. Certain commands will bring up Python-based graphics displays of solid models and results plots, but there isn't a dedicated GUI open all the time.

      The Question(s)

      My question is whether it is feasible to write a frontend GUI to a bunch of python commands. If you were going to do it, how would you do it? What might you write it with? Would you even do it? Is this a stupid endeavor?

      7 votes
    6. Libera Chat vs. Freenode: Who won?

      Let me start by saying this is a space I am not at all familiar with. I didn't grow up with IRC, my first text editor was Sublime (I'm not from the "EMACS vs. VIM" generation,) so I feel kinda...

      Let me start by saying this is a space I am not at all familiar with. I didn't grow up with IRC, my first text editor was Sublime (I'm not from the "EMACS vs. VIM" generation,) so I feel kinda outta touch with what all is going on.

      Is there a winner? I feel invested in this topic after seeing a whole slew of posts, blogs, and medium articles posted all over Reddit and HN breaking down how these folks have personally been impacted over the past month or so. It seems to have died down which leaves me with the question of what the outcome was. An even 50/50 split? Libera destroying Freenode? Or Freenode able to hold onto users by successfully preventing efforts to organize a transition?

      Without being in the Freenode community, I don't have a feeling for whether Freenode is dead, Libera Chat is "winning" and I don't think there's a good way to get metrics either.

      Anyone in this world who can help the uneducated out on the outcome of all of this?

      15 votes
    7. Continuing My Education with a CS Degree in Canada [A Help Thread]

      My Goal I am applying to Canadian universities for fall admission as a CS major. This will be my second degree, and one of the requirements of getting admitted for a second degree is to show that...

      My Goal

      I am applying to Canadian universities for fall admission as a CS major. This will be my second degree, and one of the requirements of getting admitted for a second degree is to show that you have a significant interest in the subject. My plan is to get online certificates to show that I am actually dedicated to learning CS and getting a job in the field. I am actually dedicated, I just need a way to show it on paper. I have some experience with software development (only the basics), but there aren't any records of it since it was just informal study.

      My Problem

      I can't decide which certificates I should pursue. I am torn between EdX and Udemy. I would Tilderinos' help in choosing between the two. I would also appreciate any general advice you may have.

      Here are the courses I plan to take on EdX (prices in USD):

      UBC's MicroMasters Program in
      Software Development
      - $832

      Harvard CS50's Web Programming with Python and JavaScript - $199

      IBM's Professional Certificate in
      Cloud Application Development Foundations
      - $169

      Here are the courses I plan to take on Udemy:

      The Ultimate 2021 Fullstack Web Development Bootcamp - $15

      The Complete 2021 Web Development Bootcamp - $15

      The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert - $30

      Angular - The Complete Guide (2021 Edition) - $15

      Comparisons

      To reiterate, I have two goals going into this. One is to actually learn web development, since I would like to become a fullstack developer (but my options are semi-open). The other is to prove to the Canadian universities that I am dedicated to learning and to give myself an edge over applicants.

      If I go with EdX, then I have to pay a much steeper price for the certificates. These courses also take a long time to get through and the projects don't seem as relevant to real word applications. But I will also be learning from established institutions like Harvard and UBC. EdX certificates also come with the distinct advantage that a human is checking the problem sets you submit. This will show the Canadian universities that I have actually spent the time and effort to go through the courses and pass them.

      If I go with Udemy, I will get through the courses in less time and their projects seem more related to real world projects. If I go through the courses faster, I will also have more time to start on some personal projects, and I can show my dedication to learning through those projects. Personal projects and also volunteer work will also help establish a resumé for future work. The courses on Udemy are a lot cheaper too. But they don't have the same level of verification or prestige that EdX does.

      So in summary, EdX has prestige and quality courses, but a steep prices and a huge time commitment. Udemy is cheaper and gives me more opportunities to do personal projects and volunteer work, but it's certificates aren't fully trustworthy from the Canadian universities' perspective.

      Final Words

      What do you think? Which path should I take?

      For those of you wondering, why I am going to university instead of a bootcamp, it's because I plan to immigrate to Canada and becoming a student seems the straightest way of getting PR. I need to leave my third world country as soon as I can, for mental health and economic reasons. I have been mostly unemployed ever since the pandemic started so I can't get work in Canada (or the U.S.) on my first degree (a management degree). I already tried that route. I can't find proper work here either.

      Also, I am sorry if I posted in the wrong group, or if I shouldn't have posted it anywhere at all. I desperately need advice on what to do and I don't have a trustworthy network here that can help me through this. I'm sorry and thank you for your help.

      8 votes
    8. What unified login to use?

      I'm setting up a server with nextcloud, plex, matrix and some other things I don't yet know, for some friends and family, (about 20 people if I get lucky) and now I heard of a thing called single...

      I'm setting up a server with nextcloud, plex, matrix and some other things I don't yet know, for some friends and family, (about 20 people if I get lucky)
      and now I heard of a thing called single sign on/unified login. (Login to different services with the same user/pw and/or login once, access to all services)

      so far I found out about Keycloak https://en.wikipedia.org/wiki/Keycloak

      is this what I'm looking for? does anybody have experience in this? Are there other/better/simpler solutions for this?

      12 votes
    9. Self hosting email at home?

      I recently set up kubernetes to run on an old laptop. The goal was two-fold, 1 learn kubernetes and 2 setup an instance of nextcloud. I've managed to set everything up with cert renewals for my...

      I recently set up kubernetes to run on an old laptop. The goal was two-fold, 1 learn kubernetes and 2 setup an instance of nextcloud. I've managed to set everything up with cert renewals for my domain and enabled dyndns in case my provider changes my ip. All well and good and quite nice learning experience! Now I would like to also start running my own email server and have some questions. Is ther any that have a helm chart that is easy to setup in kubernetes? Since I am running this from home I imagine I'm more likely to be classified as a spammer. What can I do to minimize the likelihood of that? I read somewhere about reverse DNS, but not entirely sure if it is possible to do given I am running it all at home via a regular ISP.

      17 votes
    10. I setup a device with decent PostmarketOS port. What can I do with it?

      I have a Xiaomi Redmi 4X device with 2GB RAM and 16GB on-device storage. Yesterday, I setup PostmarketOS on it, and it works well enough. WiFi and display work well, although no 3D acceleration...

      I have a Xiaomi Redmi 4X device with 2GB RAM and 16GB on-device storage.

      Yesterday, I setup PostmarketOS on it, and it works well enough. WiFi and display work well, although no 3D acceleration and no telephony at all. As such, now it is just another device on my home network, except that I can ssh into it to do some basic stuff. Right now it is setup as a Syncthing node to backup my Keepass db and personal knowledge base written in org-mode, but I would like to use it further, and looking for ideas.

      Two things to consider, though. First, I don't want it to overcharge and bust the battery. Before when it was on LineageOS, I had a magisk module acc so it would charge only 40-80%, and is largely the reason why the battery holds up pretty well after 5+ years without swelling. I will take further look into it over coming weekend and try to make something like it for the alpine kernel included in PmOS. Second, while on charging the phone keeps vibrating repeatedly. I have no idea how to fix that one, but would like to strat given pointers. (I have never done kernel dev in my life)

      So, any ideas on what I can use this extra computer in my metaphorical basement welcome. Thanks in advance.

      11 votes
    11. If I'm using Cloudflare for my domains, do I need to bother with LE?

      It is late... and I am pretty much finished with migrating to a new VPS provider. I got rate limited with two domains, but I'm running everything through Cloudflare. Do I need to bother with...

      It is late... and I am pretty much finished with migrating to a new VPS provider. I got rate limited with two domains, but I'm running everything through Cloudflare. Do I need to bother with LetsEncrypt on the VPS itself? When I check the domains, the certs from CF are working nicely.

      This is my first time using CF.

      Quick edit while I pretend I can sleep.

      I’m thinking that CF will cover me for 443 and route all traffic there. I’ve got wildcards set for domains with services that require other ports — which is working. All CF is doing is caching my sites, right?

      7 votes
    12. What is a class in Python?

      I've been learning a bit more Python, going through a Udemy course to expand my skills a little. One of the programs the course guides you to make is a little dictionary, but it currently only...

      I've been learning a bit more Python, going through a Udemy course to expand my skills a little. One of the programs the course guides you to make is a little dictionary, but it currently only runs once and then quits.
      I'd like to adapt it to use a nice TUI that keeps itself open until the user specifies they want to quit, using something along the lines of npyscreen. However, this library uses classes, and that's not something I'm yet familiar with. I'd rather have an understanding of what classes are, how they work, and why to use them before I take the plunge and start fiddling around with npyscreen (although I'd be interested to hear if you think that I should Just Do It instead).
      Can anyone give or point me towards a good explanation of the what, how, and why of Python classes? Or better yet, a tutorial that will give me something to write and play with to figure out how it all fits together?
      Thanks!

      9 votes
    13. Input from a text file, pull from multiple APIs, formatting output, etc. in Python

      I don't need answers so much as an idea of where to start. Essentially, I have a Google Sheet that uses importjson.gs to pull from the following APIs OMDB (IMDB) TheMovieDB TVMaze I also use...

      I don't need answers so much as an idea of where to start.

      Essentially, I have a Google Sheet that uses importjson.gs to pull from the following APIs

      • OMDB (IMDB)
      • TheMovieDB
      • TVMaze

      I also use another script to scrape Letterboxd for ratings.

      This works well, but sometimes it'll time out or I'll hit urlFetch limits that Google has in place.

      Basically, I'd like to have a text file (input.txt) where I pop in a bunch of titles and year or IMDB IDs, then the script runs and pulls set endpoints from all of these, outputting everything on one line (a pipe as a delimiter.)

      My thinking is that I can then pull that info a sheet and run all of the formatting, basic math, and whatever else so it suits my Sheet.

      I have a feeling I'll be using requests for the JSON and beautifulsoup for letterboxd -- or maybe a module.

      Can anyone point me in the right direction? I don't think it'll be too difficult and should work well for a first python project.

      7 votes
    14. What is the difference between Linux distros? Why do you use the one you use?

      I still mainly use Windows, although I've dual-booted Linux a few times and I have Linux Mint on an old laptop right now. One thing I've never understood about Linux is all the different...

      I still mainly use Windows, although I've dual-booted Linux a few times and I have Linux Mint on an old laptop right now. One thing I've never understood about Linux is all the different distributions - their different reputations and why they have them. What is the mechanical difference between using one distribution of Linux and another? Or are the differences usually not mechanical?

      For example, Ubuntu and Debian seem to be large families, meaning that a lot of other distributions are based on them (using packages built for them in their package managers at least) as well as being popular distros on their own. But what's different between the two of them, and between each and the other distros based on them? (and what's similar? I gather they all use the Linux kernel at least!)

      I also know that people are quite opinionated on their choice of distro, I wondered what reasons people had for their choice. What things are easier or harder for you in your distro of choice? Is it mainly day-to-day tasks that are important or more how the OS works underneath? How much difference does your preferred distro make?

      For myself, I've only used Kubuntu (though not much) and Linux Mint, which was mainly for UI reasons, and particularly for the latter, ease of use for someone used to Windows (at least that was what I found years ago when I first looked into it).

      Though I doubt I'll ever fully move away from Windows I would like / need to have access to a Linux OS, so maybe this will help me to know what is important to look for. But I also hope it'll be a useful and interesting discussion topic. Also, there are some previous discussions on the latter question so I'd be more interested in learning about the main topic.

      also, please do add more tags

      29 votes
    15. Full-stack developers starting a software agency?

      Hey guys, I have been flip-flopping back and forth on this idea for a while, and would love some feedback on whether peeps would find this valuable. Although I still call my self a "software...

      Hey guys,

      I have been flip-flopping back and forth on this idea for a while, and would love some feedback on whether peeps would find this valuable.

      Although I still call my self a "software developer" (and try to code daily), for the last 8 years I have ran a small 5-person agency that I started from the ground up, so my role was really CEO/CTO/CFO/Everything-O. My company focused on delivering high-quality custom software. Not brochure websites, and not Wordpress - our niche was internal business software (or as I like to call it "boring software for boring businesses") - and for a client service company we got very high margins of return.

      Last year my business was acquired by a larger company which was an amazing result after the time and effort I had poured into it. I have realised I now want to help other developers who want to start their own software agency, or maybe they already have and are looking for hints or advice on certain topics.

      So I have started Dev to Agency - a part blog part guidebook for how a full-stack developer can start and successfully run a software development agency, the things to pay attention too (and the things to ignore), and the key-values that I feel helped my business go from nothing, to 7 figures per year, and then to being acquired (if that is a path people would want to take).

      I have just published my first couple of posts, About Dev To Agency that is a rundown of what I hope to achieve with this, then a post about My small custom software development agency - which gives an overview of what I built and where I think my articles will add value, and lastly You are the gold standard which covers how I feel an owner/maker should set the businesses standards and practises based of their personal values.

      I have never written a blog before (or really done any writing before), so it would be fantastic to get some feedback from the community, and if there are any developers that this could interest then please subscribe on the website.

      Cheers,

      Chris.

      15 votes
    16. Tips to use NixOS on a server?

      I see some people using NixOs on their servers. I would like to try it out to self host some services and learn about NixOs. I use hetzner and they have an NixOs iso available so I can just use...

      I see some people using NixOs on their servers. I would like to try it out to self host some services and learn about NixOs.

      I use hetzner and they have an NixOs iso available so I can just use that to install NixOs. But how do people manage remote instances of NixOs? They would just use ansible or something like it, to run nix on the host, or is there a better way?

      Thanks

      11 votes
    17. Can you write ad-blocker rules to essentially blacklist mention of certain people?

      I've just read a journal from someone on another site saying that they wished there was a blacklisting system which stopped them seeing submissions from, to or about certain other users in their...

      I've just read a journal from someone on another site saying that they wished there was a blacklisting system which stopped them seeing submissions from, to or about certain other users in their feed, as it is potentially trauma-inducing for them to log in and keep seeing them come up. I assume that the person looking for this blacklist isn't realistically able to just leave the site, because it's the most populous of its kind and serves as an art portfolio or source of income.

      Is this, or something like it, actually possible to do with custom ad-blocker rules, or do they need to just wait for the site's admins to get around to it?

      6 votes
    18. In which a foolish developer tries DevOps: critique my VPS provisioning script!

      I'm attempting to provision two mirror staging and production environments for a future SaaS application that we're close to launching as a company, and I'd like to get some feedback on the...

      I'm attempting to provision two mirror staging and production environments for a future SaaS application that we're close to launching as a company, and I'd like to get some feedback on the provisioning script I've created that takes a default VPS from our hosting provider, DigitalOcean, and readies it for being a secure hosting environment for our application instance (which runs inside Docker, and persists data to an unrelated managed database).

      I'm sticking with a simple infrastructure architecture at the moment: A single VPS which runs both nginx and the application instance inside a containerised docker service as mentioned earlier. There's no load balancers or server duplication at this point. @Emerald_Knight very kindly provided me in the Tildes Discord with some overall guidance about what to aim for when configuring a server (limit damage as best as possible, limit access when an attack occurs)—so I've tried to be thoughtful and integrate that paradigm where possible (disabling root login, etc).

      I’m not a DevOps or sysadmin-oriented person by trade—I stick to programming most of the time—but this role falls to me as the technical person in this business; so the last few days has been a lot of reading and readying. I’ll run through the provisioning flow step by step. Oh, and for reference, Ubuntu 20.04 LTS.

      First step is self-explanatory.

      #!/bin/sh
      
      # Name of the user to create and grant privileges to.
      USERNAME_OF_ACCOUNT=
      
      sudo apt-get -qq update
      sudo apt install -qq --yes nginx
      sudo systemctl restart nginx
      

      Next, create my sudo user, add them to the groups needed, require a password change on first login, then copy across any provided authorised keys from the root user which you can configure to be seeded to the VPS in the DigitalOcean management console.

      useradd --create-home --shell "/bin/bash" --groups sudo,www-data "${USERNAME_OF_ACCOUNT}"
      passwd --delete $USERNAME_OF_ACCOUNT
      chage --lastday 0 $USERNAME_OF_ACCOUNT
      
      HOME_DIR="$(eval echo ~${USERNAME_OF_ACCOUNT})"
      mkdir --parents "${HOME_DIR}/.ssh"
      cp /root/.ssh/authorized_keys "${HOME_DIR}/.ssh"
      
      chmod 700 ~/.ssh
      chmod 600 ~/.ssh/authorized_keys
      chown --recursive "${USERNAME_OF_ACCOUNT}":"${USERNAME_OF_ACCOUNT}" "${HOME_DIR}/.ssh"

sudo chmod 775 -R /var/www
      sudo chown -R $USERNAME_OF_ACCOUNT /var/www
      rm -rf /var/www/html
      

      Installation of docker, and run it as a service, ensure the created user is added to the docker group.

      sudo apt-get install -qq --yes \
          apt-transport-https \
          ca-certificates \
          curl \
          gnupg-agent \
          software-properties-common
      
      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      sudo apt-key fingerprint 0EBFCD88
      
      sudo add-apt-repository --yes \
         "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
         $(lsb_release -cs) \
         stable"
      
      sudo apt-get -qq update
      sudo apt install -qq --yes docker-ce docker-ce-cli containerd.io
      
      # Only add a group if it does not exist
      sudo getent group docker || sudo groupadd docker
      sudo usermod -aG docker $USERNAME_OF_ACCOUNT
      
      # Enable docker
      sudo systemctl enable docker
      
      sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
      sudo chmod +x /usr/local/bin/docker-compose
      sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
      docker-compose --version
      

      Disable root logins and any form of password-based authentication by altering sshd_config.

      sed -i '/^PermitRootLogin/s/yes/no/' /etc/ssh/sshd_config
      sed -i '/^PasswordAuthentication/s/yes/no/' /etc/ssh/sshd_config
      sed -i '/^ChallengeResponseAuthentication/s/yes/no/' /etc/ssh/sshd_config
      

      Configure the firewall and fail2ban.

      sudo ufw default deny incoming
      sudo ufw default allow outgoing
      sudo ufw allow ssh
      sudo ufw allow http
      sudo ufw allow https
      sudo ufw reload
      sudo ufw --force enable && sudo ufw status verbose
      
      sudo apt-get -qq install --yes fail2ban
      sudo systemctl enable fail2ban
      sudo systemctl start fail2ban
      

      Swapfiles.

      sudo fallocate -l 1G /swapfile && ls -lh /swapfile
      sudo chmod 0600 /swapfile && ls -lh /swapfile
      sudo mkswap /swapfile
      sudo swapon /swapfile && sudo swapon --show
      echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
      

      Unattended updates, and restart the ssh daemon.

      sudo apt install -qq unattended-upgrades
      sudo systemctl restart ssh
      

      Some questions

      You can assume these questions are cost-benefit focused, i.e. is it worth my time to investigate this, versus something else that may have better gains given my limited time.

      1. Obviously, any critiques of the above provisioning process are appreciated—both on the micro level of criticising particular lines, or zooming out and saying “well why don’t you do this instead…”. I can’t know what I don’t know.

      2. Is it worth investigating tools such as ss or lynis (https://github.com/CISOfy/lynis) to perform server auditing? I don’t have to meet any compliance requirements at this point.

      3. Do I get any meaningful increase in security by implementing 2FA on login here using google authenticator? As far as I can see, as long as I'm using best practices to actually ssh into our boxes, then the likeliest risk profile for unwanted access probably isn’t via the authentication mechanism I use personally to access my servers.

      4. Am I missing anything here? Beyond the provisioning script itself, I adhere to best practices around storing and generating passwords and ssh keys.

      Some notes and comments

      1. Eventually I'll use the hosting provider's API to spin up and spin down VPS's on the fly via a custom management application, which gives me an opportunity to programmatically execute the provisioning script above and run some over pre- and post-provisioning things, like deployment of the application and so forth.

      2. Usage alerts and monitoring is configured within DigitalOcean's console, and alerts are sent to our business' Slack for me to action as needed. Currently, I’m settling on the following alerts:
        1. Server CPU utilisation greater than 80% for 5 minutes.
        2. Server memory usage greater than 80% for 5 minutes.
        3. I’m also looking at setting up daily fail2ban status alerts if needed.
      9 votes
    19. What's the deal with gemini?

      Hi! I've heard tilderinos talking about the gemini-verse on some other posts; I tried it out this evening and it honestly felt strange browsing in terminal and even stranger navigating the web...

      Hi! I've heard tilderinos talking about the gemini-verse on some other posts; I tried it out this evening and it honestly felt strange browsing in terminal and even stranger navigating the web without search engines. I was wondering if anyone had a gentler introduction than the official site? I feel like I've got a ship, but no map to this new verse.

      26 votes
    20. Is there a known image norm suitable for textured images?

      Suppose I am trying to iteratively produce a completed image from some subset using a combination of convolutional/DNN methods. What Image norm is best? The natural (for me) norm to ascribe to an...

      Suppose I am trying to iteratively produce a completed image from some subset using a combination of convolutional/DNN methods. What Image norm is best?

      The natural (for me) norm to ascribe to an image is to take the bitmap as a vector with L2. If the input image is anime or something else, the uniform coloring makes this very likely to be a good fit in a low dimension - that is: no overfitting.

      However: pictures of fur. Given a small square, the AI, set to extrapolate more fur from that single image, should be expected to get that stuff right next to the given subimage right, but further away, i want it to get the texture right, not the exact representation. So, if the AI shifts the fur far away from the image left by just the right amount, it could get an incredibly poor score.

      If I were to use the naive L2 norm directly, I would be guaranteed to overfit, and you can see this with some of the demo algorithms for image generation around the web. Now, the answer to this is probably to use a fourier or a wavelet transform and then take the LN norm over the transformed space instead (correct me if I'm wrong.)

      However, we get to the most complex class: images with different textures in them. In this case, I have a problem. Wavelet-type transforms don't behave well with discrete boundaries, while pixel-by-pixel methods don't do well with the textured parts of images. Is there a good method of determining image similarity for these cases?

      More philosophically, what is the mathematical notion of similarity that our eye picks out? Any pointers or suggestions are appreciated. This is the last of two issues I have with a design I built for a Sparse NN.

      Edit: For those interested, here is an example, notice how the predictions tend to blur details

      7 votes
    21. I can't make it any clearer. Any advice?

      Last Thursday, at my workplace, we rolled out a software upgrade across the company. The server side was upgraded overnight to ensure there was minimal downtime, and we had instructions for users...

      Last Thursday, at my workplace, we rolled out a software upgrade across the company. The server side was upgraded overnight to ensure there was minimal downtime, and we had instructions for users posted on our Intranet (pinned to the top for the next 4 days), on exactly what they needed to do to run the upgrade on their PCs and ensure everything was working correctly.

      The instructions were written with the help of my 4-year-old to ensure it was clear enough for anyone to read and follow along.

      I still received at least 40 messages and emails from people complaining the upgrade didn't work or that certain Outlook plugins are now missing (which was covered in the instructions).

      My question is, has anyone found a good way to ensure people follow instructions, or the best way to ensure that your instructions are easy to understand and follow along with?

      It is very frustrating to take the time to ensure things go smoothly and write what even my 4-year-old thought was clear instruction, and still have a third of the company not be able to figure it out?

      This is not meant to be mean hearted in any way, I genuinely would like some advice or tips on how I can improve on this the next time around.

      Thanks.

      16 votes
    22. How to design a database?

      I'm working on an application that allows a user to view playlists belonging to a particular radio show and stream/download/favourite the tracks in them. It has 4 core entities: User, Show,...

      I'm working on an application that allows a user to view playlists belonging to a particular radio show and stream/download/favourite the tracks in them. It has 4 core entities: User, Show, Playlist and Track.

      • Each show has multiple playlists (one-to-many)
      • Each playlist has multiple tracks (one-to-many)

      To be able to reference a playlist belonging to a particular show. I gave those playlists the same uuid as the show they belong to. A few questions though.

      1. Is this the right/best way to associate data?
      2. As a track could potentially belong to multiple playlists, I can't take the same approach as I do for (show/playlist) How would be best to handle this? Ideally I would like to have a single "Track" table containing all tracks for all playlists.

      For any experienced database designers out there, how would you structure this data? What would you consider in designing the schema and why? If I did go with 4 tables only, presumably there would be performance implications given the potential amount of data in any one of those tables, particularly tracks. If that is the case, how best to structure this kind of thing with performance in mind? Thanks in advance for any help :)

      For reference, in case it's of importance, I'm using sqlite3.

      5 votes
    23. Architecture for untrained software engineers (Python)

      Hey everyone, I've been programming for some time now but notice without any formalized education in CS I often get lost in the weeds when it comes to developing larger applications. I'm familiar...

      Hey everyone,

      I've been programming for some time now but notice without any formalized education in CS I often get lost in the weeds when it comes to developing larger applications. I'm familiar with the principles of TDD and SOLID - which have helped with maintainability - however still feel that I'm lacking in the ability to architect a properly structured system. As an example, I'm currently developing a flask REST API for a website (just for learning purposes). This involves parsing a html response and serializing the result as JSON. I'm still quite unclear as to structuring this sort of thing. If any more experienced developers could point me in the right direction/offer up their opinion I'd be very appreciative. Currently I have something like this (based - I hope correctly? - on uncle bob's clean architecture).

      Firstly, I'm defining the domain model. i.e the structure of the API response. Then, from outside in.

      1. Infrastructure (Flask): User makes request via interface (in my case a request to some endpoint)
      2. Adapters: request object checks if the request is valid (on the way back it checks if the response is valid) - Is this layer only for error handling?
      3. Repository: I'm struggling a bit here, AFAIUI this layer is traditionally a database. In my case however, where the request is valid, is this where I should handle the networking layer? i.e all the requests to return the website source? I'm also confused given at this stage I should be returning the relevant domain model, like an ORM, but as my data is unstructured, in order to do this I need to transform the response first. Where would it be best to handle this?
      4. Use Cases: Here I transform the domain model depending on the request. For example, filter all objects by id. Have I understood this correctly?
      5. Serializers: Encode the domain model as JSON to return from flask route.

      If you got this far, thanks so much for reading. I really hope to hear the opinions of more experienced devs who can steer me in the right direction/correct me should I have misunderstood anything.

      8 votes
    24. Designer to Developer Handoff Process

      I am a fullstack developer that spends a good portion of my time building out complex User Interfaces, and the rest building out back-ends for that software. In my opinion the current method that...

      I am a fullstack developer that spends a good portion of my time building out complex User Interfaces, and the rest building out back-ends for that software. In my opinion the current method that my company uses for a designer to developer hand off is a bit lacking in efficiency.

      The current method is usually a designer will provide a developer with a Photoshop (or very occasionally an Illustrator) file containing the entire applications design. It is then up to the developer to export assets (both quick exporting things as pngs, going through and separating shadows from assets, or creating assets from the layers provided) and dig through the file to determine fonts and placement of items.

      Is it a common expectation that a developer should be spending a good chunk of time in Adobe on asset manipulation?

      Additionally does anyone have any process or program suggestions that may make life easier?

      3 votes
    25. Recommendations to learn SQL?

      I read the AskReddit thread on "What costs less than $100 that changed your life?" (link unavailable since I'm at work) but someone responded "SQL" - jobs just open up that make a ton of money. I...

      I read the AskReddit thread on "What costs less than $100 that changed your life?" (link unavailable since I'm at work) but someone responded "SQL" - jobs just open up that make a ton of money.

      I did a cursory search on Indeed and holy moly they were right -- SQL jobs get easily 2x what I make now. I'm pretty good at Excel and that sort of thinking, so I was thinking I'd try taking a class.

      Do yall have any recommendations as to a good course to take in SQL, preferably online, preferably free or cheap? I'm willing to pay a bit if it'll mean I can make a lot more, but I'm currently not making a ton, haha.

      Any responses welcome, including ideas as to how to break into like, tech-oriented fields as well.

      9 votes
    26. What's the current state-of-the-art in Python package creation/distribution?

      I've been thinking on and off about packaging up a few simple Python utilities I've written to stick up on Github for people to use if they want, but, every time I go to check out how one goes...

      I've been thinking on and off about packaging up a few simple Python utilities I've written to stick up on Github for people to use if they want, but, every time I go to check out how one goes about managing dependencies and all that for a project, I run into a whole wall of options. Does anyone better versed in all of this have any recommendations for me?

      11 votes
    27. What's a good way to learn how to maintain my own computer hardware?

      I have two computers (a desktop and a laptop) that broke down just before my city entered a lockdown. Being able to assemble and fix my own computer hardware is something I have always wanted to...

      I have two computers (a desktop and a laptop) that broke down just before my city entered a lockdown. Being able to assemble and fix my own computer hardware is something I have always wanted to do, and if I knew that I would probably not be using a borrowed Macbook Air right now.

      I have no immediate need to provide any maintenance services, nor do I require a primer in electronics or anything too advanced. Just enough to know how to assemble and disassemble a machine, identify and fix the most obvious issues without breaking anything.

      I tend to learn better from sequential and structure learning materials, preferably in text/images form. But videos are also welcomed. I know the names of the things and what they are, but I don't really know how to put things together in practice.

      Suggestions? :)

      13 votes
    28. What is a good free alternative to Wordpress that requires little coding?

      I have basic notions of HTML and CSS, but nearly zero JS knowledge. I can perform simple customizations and I know how to follow instructions. It is not my intention to create anything from...

      I have basic notions of HTML and CSS, but nearly zero JS knowledge. I can perform simple customizations and I know how to follow instructions.

      It is not my intention to create anything from scratch (so the platform should have plenty of free themes), nor do I want to become a webdev or webdesigner. This is not a technical project for me, my main concern is the content.

      I currently have a blog that uses Wordpress with a purchased theme. It's good enough, but a bit slow to load. Besides, simpler platforms might be easier to understand and manipulate.

      This alternative would also need to be FOSS and easy to self-host.

      As a plus, it would be awesome if I could manage the blog/website from within Emacs/Org Mode.

      Any ideas?

      14 votes
    29. Hard drive dying, trying to save a VM

      I have a large VirtualBox VM on an external HDD. The HDD fails the S.M.A.R.T. test. The VM still works fine, but any regular attempt to copy the VM files over to a healthy drive fails ... there is...

      I have a large VirtualBox VM on an external HDD. The HDD fails the S.M.A.R.T. test. The VM still works fine, but any regular attempt to copy the VM files over to a healthy drive fails ... there is clearly already something corrupt in the VM's virtual HDD, although it is not (apparently? yet?) affecting the functionality of the actual VM.

      Any suggestions on how to save the VM? Linux Mint Guest OS, Pop_OS (Ubuntu) Host. The VM is nearly 800 GB. Both regular copy and rsync fail.

      Thanks,
      Eric

      PS: (and perhaps I should have led with this, but...) is it okay to ask these kinds of specific, technical, "help me with my tech-stuff" questions here on Tildes?


      Update to the update ... moved update info into a comment ... will keep my progress updated in that primary comment.

      Danke, y gracias to all

      14 votes
    30. Ask Tildes: Design practices for retrieving dozens (or hundreds) of related records over a RESTful API

      I'm looking for some feedback on a feasible mechanism for structuring a few API endpoints where a purely RFC-spec compliant REST API wouldn't suffice. I have an endpoint which returns $child...

      I'm looking for some feedback on a feasible mechanism for structuring a few API endpoints where a purely RFC-spec compliant REST API wouldn't suffice.

      I have an endpoint which returns $child entries for a $parent resource, let's call it: /api/parent/:parentId/children. There could be anywhere from a dozen to several hundred children returned from this call. From here, a child entity is related to a single userOrganization, which itself is a pivoting entity on a single user. The relationship between a child and user is not strictly transitive, but can each child only has one userOrganization which only has one user, so it is trivial to reach a user from a child resource.

      Given this, the data I need for the particular request involves retrieving all user's for a parent. The obvious, and incorrect solution to the problem is to make the request mentioned above, and then iterate through and make an API request to retrieve each user. This is less than very good as this would obviously be up to several hundred API calls.

      There's a few more scalable solutions that could solve this problem, so any input on these ideas is great; but if you have a better proposal that also works, I'm keen to explore that!

      Include user relationships in the call by default.

      This certainly does solve the problem, but it's also pumping down a load of data I don't necessarily need. This would probably 2x the amount of bytes travelling along the wire, and in 8 out of 10 calls, that extra data isn't needed.

      Have a separate /api/parent/:parentId/users call.

      Another option that partially solves the issue: I need data from both the child and the user to format this view, so I'd still need to make the initial call I documented earlier. Semantically, it feels a bit odd to have this as a resource because I don't consider a user to be nested under a parent in terms of database topology.

      Keep the original call, but add a query parameter to fetch the extra data

      This comes across as the 'least worst' idea objectively, in terms of flexibility and design. Through the addition of the query parameter, you could optionally retrieve the relationship's data. This seems brittle and doesn't scale well to other endpoints where it could be useful though.

      Utilize a Stripe expands-style query parameter.

      Stripe implements the ability to retrieve all related records from an API endpoint by specifying the relations as strings. This is essentially the same as the above answer, but is scaled to all available API endpoints. I love this idea, but implementing it in a secure way seems fraught with disaster. For example, this is a multi-tenancied application, and it would be trivial to request userOrganization.user.organizations.users. This would retrieve all other organisations for the user, and their users! This is because my implementation of expands simply utilises the ORM of my choice to perform a database join, and of course the database has no knowledge about application tenancy!


      Now, I do realise this problem could easily be solved by implementing a GraphQL API server, which I have done in the past, but unfortunately time and workload constraints dictate implementing a GraphQL-based solution is infeasible. As much as I like GraphQL, I'm not as proficient in that area as compared to implementing high quality traditional APIs, and the applications I'm working on at the moment are focusing on choosing boring technology, and not using excessive innovation tokens.

      Furthermore, I do consider the conceptuals around REST APIs to be more of an aspirational sliding scale, rather than a well defined physical entity, because let's face it, the majority of popular APIs today aren't REST-compliant, even Stripe's isn't, and it's usually both financially healthier and feature-rich to choose a development path that results in a rough product that can be refined later, than aiming for a perfect initial release. All this said, I don't mind proposals or solutions to my problem that are "good enough". As long as they aren't too hacky! :)

      10 votes
    31. Information on SaaS companies and enterprise software companies

      I would like to know more about SaaS companies and enterprise software companies from a business and technology perspective - to know about challenges in the industries, what has been...

      I would like to know more about SaaS companies and enterprise software companies from a business and technology perspective - to know about challenges in the industries, what has been revolutionary, what hasn't, where it is headed, etc. Where would be a good place to start on this?

      3 votes
    32. I want to learn programming. What language should i pick to write cli apps for linux?

      I'm interested in C or Go, but i'm open to ideas. I have plenty of sh scripts i created to integrate my tools and system, so i have some experience and i don't want a scripting language like...

      I'm interested in C or Go, but i'm open to ideas.

      I have plenty of sh scripts i created to integrate my tools and system, so i have some experience and i don't want a scripting language like python.

      My first plan is to learn the basics of the language and rewrite some of those scripts.

      I think my first pick will be a script that uses ffmpeg to convert my flac files to mp3 or opus. I use sndconv -opus/-mp3 and it checks if there are flac files in the folder (i only have full albums), converts and puts in a folder named "$artist - $album".

      My long term goal is to make a cli/tui music player like cmus.

      UPDATE: i'm having plenty of success with Go right now. I just wrote a basic version of my music conversion script. It's just converting a music i pass as argument to mp3, but i'll keep working on it and adding functionality just to dip my toes in Go. It seems like a good language and i'm having fun!

      Thanks for all the answers!

      18 votes
    33. Please criticize my idea for CHORES - a short-term TODO app for ADHD people (and myself in particular)

      Introduction I'm a beginner in programming, but a veteran in film and literature. I know that ideas come easy. Any normal person can come up with a good idea in a matter of minutes. The main...

      Introduction

      I'm a beginner in programming, but a veteran in film and literature. I know that ideas come easy. Any normal person can come up with a good idea in a matter of minutes. The main problem is doing it.

      Besides, I couldn't care less if someone does that before me. I'd probably benefit from their program, and even offer to collaborate. I have a bunch of other ideas in the oven anyway.

      And I'm humble enough to know that such a niche project would never attract the interest of a mega-corporation anyway.

      2. What is CHORES?

      CHORES is a short-term task manager. It's meant to organize nothing more than a few hours or less of your tasks. Month, weak or even your entire day are entirely out of its scope.

      3. Who is CHORES for?

      First and foremost, this app is for my use. But I'm certain there are other people with conditions similar to mine, especially ones with ADHD. I'm also autistic with a compulsive personality, and won't stop until I tinker with every aspect of an object. Not surprisingly, I'm a Linux, i3wm, Emacs and Neovim user. And they're excruciatingly customized.

      What I need is not a full-featured a TODO app like Remember The Milk, Todoist or Org Mode. They're too distracting, I end up just playing with the tools. I need something that allows me to track very short term chores. Thinks like brushing my teeth, taking a shower, eating, walking my dog, washing the dishes and making my bed.

      That's what I intend to do.

      4. What is ADHD

      From the United States National Institute of Mental Health:

      Attention-deficit/hyperactivity disorder (ADHD) is a disorder marked by an ongoing pattern of inattention and/or hyperactivity-impulsivity that interferes with functioning or development.

      4.1 Warning

      Please refrain from suggesting that the ones who use such tools just need to make an effort instead. That's a cliche most people with ADHD and other mental health issues probably heard many times, and by saying that you may cause distress. If you need more information, please refer to the link posted above.

      5. Why another "TODO" app?

      People with severe ADHD like myself frequently forget what they're doing, and what they should do in the very short term. I'm talking 2, 3 or 5 tasks from now. To give you an idea of how bad it is, right now I have an Emacs Org Mode file with the following tasks:

      * Now
      ** TODO Take Ritalin
      ** TODO Start chronometer on Ritalin
        - Tells me when the effect wears off
      ** TODO Take a shower
      ** TODO Take the laptop to the living room
      ** TODO Wash the dishes
      ** TODO Study Python
      ** TODO Post on Tildes
      

      But Emacs and Org Mode do a lot more than that, and this can be very distracting (right now I'm writing this post because creating another file from my now.org file was way too easy, for example).

      Considering that I am the main target audience of this program, any space for tinkering is a dangerous avenue for procrastination.

      6. Who is CHORES for

      The primary target of this project are people with:

      1. ADHD (Attention deficit hyperactivity disorder)
      2. similar conditions or personality traits

      In sum: if you have extreme difficulty focusing, remembering and fulfilling your tasks in the very short term, you may find this program useful.

      7. Who is CHORES not for

      The majority of people can concentrate and perform their short-term tasks with a reasonable degree of efficiency. If that is your case, you have little to gain by using CHORES.

      8. Features

      CHORES is a short-term task manager. It's meant to organize nothing more than a few hours: not your month, weak or even your day.

      1. CLI Linux app (Mac, Windows, GUI, and mobile could happen in the future)
      2. Hard limit of ten tasks (with the option to reduce)
      3. Only the very essential configurations available
      • tinkering is a huge time drain for ADHD people
      • because of that, the defaults will have to be extremely sensible.
      1. Started Stopped status clearly marked by character or highlighting

      8.1 What you would be able to do with CHORES:

      1. Add up to ten tasks
      2. Reorder/Start/Stop/Done these tasks
      3. Undo only one operation
      4. See only the last ten completed tasks

      9. Answer to Possible Questions

      9.1 Why Not Keep Using Org Mode? Or maybe Taskwarrior?

      Org Mode and Emacs are wonderful tools, but they're also a perfect playground for procrastinators. It simply does too much. Emacs is like a box of legos, and that's the last thing an ADHD person needs when it comes to tracking short-term tasks.

      Taskwarrior suffers from the same issue.

      9.2 Why Not todo.txt and similar apps?

      This may seem crazy, but for a severe ADHD person, even todo.txt gives way too many options and features. It is, after, an actual TODO app. I can add 1000 tasks todo.txt. It has an extensive wiki, projects, tags, context tags, special value tags. You might just say: just don't use these options. But that

      9.3 Why not use the extremely minimalist t task manager, by Steve Losh?

      I like t very much, and, depending on its license, I'll probably use at least some of its code. But t lacks some features CHORES requires, such as:

      1. Limit task amount
      2. Add tasks to the bottom (t last tasks randomly, or at least something that seem random to me)
      3. Reorder tasks
      4. Undo
      5. Easily view completed tasks
      6. Add Start/Stop status to a task

      9.4 Why not pen and paper?

      This is a very personal anwer, but here we go:

      1. I will lose the paper every 30 minutes
      2. I will lose the pen every 30 minutes
      3. I will forget to look at the paper, it will probably end up crumpled in my pock
      4. Many of my tasks, such as programming and studying, already happen in the computer anyway
      5. One of my medications interferes with my motor skills and my handwriting is hard to understand - even for me
      6. I like computers. The fact that I like computers makes more likely for me to actually look at the tasks.
      7. In the future, I can add alerts. Can't do that with paper
      11 votes
    34. Looking for advice on a CI / regression testing platform

      Hi all, I'm looking for some advice regarding how to set up a basic CI regression / testing suite. This isn't my full time job, but a side project my group at work wants to spin up to... shall we...

      Hi all,

      I'm looking for some advice regarding how to set up a basic CI regression / testing suite. This isn't my full time job, but a side project my group at work wants to spin up to... shall we say, give us a more real time monitoring of functionality and performance regressions coming out of the underlying software stack development (long story).

      As none of us are particularly automation experts, I was looking for some advice from my fellow Tilderinos. Please forgive me if any of the below is obvious and/or silly.

      A few basic requirements I had in mind:

      1. Can handle different execution environments: essentially different versions of the software stack, both in docker form and (eventually) via lmod or some other module file approach (e.g., TCL), and sensible handling of a node list.

      2. Related to one, supports using the products of builds as execution environments. Ideally we'd like to have a build step compile the stack and install it to a NFS from which we can load it as a module.

      3. Simple to add tests. Again, this isn't our full time job -- we mostly want to add a quick bash script / makefile / source code or the like to the tests when we run into an issue and forgot about it.

      4. Related. We should be able to store the entire thing as a git repo. I have seen this to some extent with Travis, but my experience with Jenkins was... sub-par (is there a history? Changelog? Any way at all of backing up the test config?).

      5. Some sort of post-processing capabilities. At a glance we need to be able to see the top line performance numbers for 20-30 apps over the different build environment. Bonus points if there's a graph showing performance vs build version or the like, but honestly a CSV log file is good enough.

      6. Whatever CI software we get has to be able to run this locally. Lots of these are internal only numbers / codes. FOSS prefered.

      7. A webui for scheduling runs / visualizing results would be nice, but again this could be a bash script and none of us would bat an eye.

      Any thoughts would be greatly appreciated. Thanks!

      7 votes
    35. How can I make "whereis" automatically open the file on Nvim when it is the only result?

      EDIT: SOLVED It looks like it was much simple than I thought and someone solved it on Reddit already. I won't delete, just leave the link if someone is interested. Runtime Environment OS: MX Linux...

      EDIT: SOLVED

      It looks like it was much simple than I thought and someone solved it on Reddit already. I won't delete, just leave the link if someone is interested.

      Runtime Environment

      Issue

      Sometimes I use "whereis" (aliased for "wh", but it doesn't make any difference...) for my own scripts.

      I usually copy their paths manually (using tmux) and paste to the command line resulting in something like this:

      nvim /home/my_username/my_scripts_folder/my_script
      

      Could I make that into a single command?

      Thanks in advance!

      3 votes
    36. Please tell me what you think about this idea for a text editor/Linux Distribution combo

      I know there are similar products I could buy in the US that would give me this experience, but I'm not in the US and I don't have much money. In the old days, my father had some kind of machine...

      I know there are similar products I could buy in the US that would give me this experience, but I'm not in the US and I don't have much money.

      In the old days, my father had some kind of machine that was not a proper laptop and not a proper typewriter. It opened instantly to a text editor. As far as I remember, there was no noticeable boot time. It had a keyboard and an entry for a floppy disk. You typed your stuff, saved it to the floppy disk, probably to send via email or to print in another machine. I loved that machine.

      I love these little gadgets that do one thing and one thing only. And, as someone with severe ADHD, they're often a necessity. If my Kindle had Youtube I would never read a book. If my PS4 had Emacs I would never play a game. The list goes on, but the principle is this: a lot of things are useful to me precisely because of what they cannot do.

      And that is why I wanna recreate my father's crazy computer-typewriter.

      Because I know how to use the command line, it really needs to be in total lockdown: I open it up, it shows a very simple text editor (with a few handy features that make it works even more like a typewriter) that I cannot configure, tinker or alter in any way. It's focused on writing (not editing) literature because that's what I need and other kinds of writing require an internet connection.

      It would save and back up automatically (like a typewriter) to one or more drives at your choice.

      There would need to be a few options because of different screen sizes, the number of screens etc, with an interface to make it easier.

      So the idea is an ultra-minimal, kiosk-mode Linux distribution that can either go on a flash drive or be installed on an old laptop. No package management, no internet connection, no access to the command line, no configuration files, no distractions whatsoever. I wanna forget I'm even using Linux. I wanna recreate my father's typewriter/computer that he never let me touch.

      How do I do this?

      14 votes
    37. Should I Get Into Gentoo? (x-post from /r/Gentoo)

      I've been using Linux for the past 5 to 10 years. I'm not a developer, but a mid-to-advanced user. I don't really know bash (or any programming language for that matter), but I got a folder with...

      I've been using Linux for the past 5 to 10 years. I'm not a developer, but a mid-to-advanced user. I don't really know bash (or any programming language for that matter), but I got a folder with 100 bash scripts I wrote myself. I compile my own Emacs (which I configured from scratch and contains more than 200 crudes functions of my own), Neovim (also configured from scratch) and other programs such as suckless terminal. I'm an i3wm user and currently use MX-Linux. I'm very good at Googling and pattern recognition.

      I got a brand new AMD desktop with a Ryzen processor (no dedicated graphics, wifi works fine with a USB adapter). Should I try Gentoo, or maybe I should study more (maybe with something like Linux Journey)in order to get a better experience?

      Reasons to install Gentoo:

      1. Learning experience
      2. A completely customized desktop experience
      3. Never having to reinstall my operating system again
      4. Masochism
      5. Putting my powerful processor to work
      6. It seems cool (and less painful than LFS)
      7. Some hypothetical performance gain
      3 votes
    38. Would it be bad to mount a macbook pro upside down on a VESA tray?

      I've got a smaller desk with two monitor arms -- one with a monitor (left side, different system) and one with a VESA mounted tray for my macbook pro (late 2013 15".) I'm going to be adding a...

      I've got a smaller desk with two monitor arms -- one with a monitor (left side, different system) and one with a VESA mounted tray for my macbook pro (late 2013 15".)

      I'm going to be adding a 1440p monitor from the macbook pro, but I'm short on desk space. Instead of having the laptop on the tray normally, if I lay it lid down with the laptop portion up, the laptop base could sit behind the new monitor with the screen coming out the bottom -- perfect for static applications like VSCode, iTerm2, etc.

      Here's a mock up. The thicker outline represents the macbook pro screen.

      Can anybody foresee any issues with this configuration?

      6 votes
    39. I'm trying to get a programming job without a degree. Got any tips?

      Hey ~, I'm trying to get a programming job. I don't have a degree (I may go to college, but if I do it'll be in a few months), and little work experience. Do you have any tips that could help me...

      Hey ~, I'm trying to get a programming job. I don't have a degree (I may go to college, but if I do it'll be in a few months), and little work experience. Do you have any tips that could help me have a successful job search?

      Here's my resume (somewhat anonymized). I tried to focus on experience I've gained from creating open-source projects to show the skills that I have. I've made sure that all the projects listed have demos, screenshots, usage instructions, etc. Any advice on how I could improve it would be appreciated.

      Thanks!

      22 votes
    40. Deploying containerized Docker instances in production?

      Hello! After spending many development hours in my past years running on Virtualbox/Vagrant-style setups, I've decided to take the plunge into learning Docker, and after getting a few containers...

      Hello! After spending many development hours in my past years running on Virtualbox/Vagrant-style setups, I've decided to take the plunge into learning Docker, and after getting a few containers working, I'm now looking to figure out how to deploy this to production. I'm not a DevOps or infrastructure guy, my bread and butter is software, and although I've become significantly better at deploying & provisioning Linux VPS's, I'm still not entirely confident in my ability to deploy & manage such systems at scale and in production. But, I am now close to running my own business, so these requirements are suddenly going from "nice to have" to "critical".

      As I mentioned, in the past when I've previously developed applications that have been pushed onto the web, I've tended to develop on my local machine, often with no specific configuration environment. If I did use an environment, it'd often be a Vagrant VM instance. From here, I'd push to GitHub, then from my VPS, pull down the changes, run any deployment scripts (recompile, restart nginx, etc), and I'm done.

      I guess what I'm after with Docker is something that's more consistent between dev, testing, & prod, and is also more hands off in the deployment process. Yet, what I'm currently developing still does have differing configuration needs between dev and prod. For example, I'd like to use a hosted DB solution such as DigitalOcean Managed Databases in production, yet I'm totally fine using a Docker container for MySQL for local development. Is something like this possible? Does anyone have any recommendations around how to accomplish this, any do's and dont's, or any catches that are worth mentioning?

      How about automating deployment from GitHub to production? I've never touched any CI/CD tools in my life, yet I know it's a hugely important part of the process when dealing with software in production, especially software that has clients dependent on it to function. Does anything specifically work well with Docker? Or GitHub? Ideally I want to be avoiding manual processes where I have to ssh in, and pull down the latest changes, half-remembering the commands I need to write to recompile and run the application again.

      10 votes
    41. How do you structure larger projects?

      I'll be writing a relatively large piece of scientific code for the first time, and before I begin I would at least like to outline how the project will be structured so that I don't run into...

      I'll be writing a relatively large piece of scientific code for the first time, and before I begin I would at least like to outline how the project will be structured so that I don't run into headaches later on. The problem is, I don't have much experience structuring large projects. Up until now most of the code I have written as been in the form of python scripts that I string together to form an ad-hoc pipeline for analysis, or else C++ programs that are relatively self contained. My current project is much larger in scope. It will consist of four main 'modules' (I'm not sure if this is the correct term, apologies if not) each of which consist of a handful of .cpp and .h files. The schematic I have in mind for how it should look is something like:

      src
       ├──Module1 (Initializer)
       │         ├ file1.cpp
       │         ├ file1.h
       │         │...
       │         └ Makefile
       ├───Module2 (solver)
       │          ├ file1.cpp
       │          ├ file1.h
       │          │...
       │          └ Makefile
       ├───Module3 (Distribute)
       │          ├ file1.cpp
       │          └Makefile 
       └ Makefile
      

      Basically, I build each self-contained 'module', and use the object files produced there to build my main program. Is there anything I should keep in mind here, or is this basically how such a project should be structured?

      I imagine the particularly structure will be dependent on my project, but I am more interested in general principles to keep in mind.

      14 votes
    42. I want to get into IT as a career, but I have no previous experience. What essential skills should I know?

      I've recently started taking some IT and programming classes at a local college because I've always been interested in IT as a career but I've never had any sort of professional experience in the...

      I've recently started taking some IT and programming classes at a local college because I've always been interested in IT as a career but I've never had any sort of professional experience in the field. Are there any skills that I need to definitely know, or any sort of certifications that I can get in order to get my foot in the door and start applying for IT focused jobs?

      24 votes
    43. Working as a contractor in IT

      Does anyone have any experience working as a contractor in the IT field? I have 4 years of experience in the IT industry, all of it as a full time direct hire. I may have an opportunity to work...

      Does anyone have any experience working as a contractor in the IT field? I have 4 years of experience in the IT industry, all of it as a full time direct hire. I may have an opportunity to work for a very large company on a 2 year contract at fairly reasonable salary increase. The most important part to me is that I will be getting some experience off of the service desk as well, which I can use to continue my career going forward.

      My main concern is that I am unfamiliar with contract work. I do know that I get health benefits / 401k / sick days, but I assume there must be a drawback to being a contractor, right? I feel like being a contractor is inherently more unstable than being an actual hire. The position I am being considered for is a 2 year contract, but I worry that the position could simply disappear a few months in and I'd be out of a job. Is this a fair feeling, and is there any way I can gauge how true this might be for my position? Is there something I could discreetly ask in my interview that might help me understand if this is a stable position?

      If anyone has any experience as a contractor, I'd love to hear it.

      4 votes
    44. Using ghoneycutt/pam puppet module

      Hi guys, I'm really stumped and looking for a nudge in the right direction for how to utilise the ghoneycutt/pam module in puppet. Relatively new to this but got what I'd like to think as most the...

      Hi guys,

      I'm really stumped and looking for a nudge in the right direction for how to utilise the ghoneycutt/pam module in puppet. Relatively new to this but got what I'd like to think as most the basics down.

      I've configured a few things using modules such as NTP, SSSD and NSSWITCH but I'm just stuck on how I can use this module and pull info from Hiera into it.

      So, lets start with

      .yaml file:

      
              ### nsswitch.conf authentication configuration
      
              nsswitch::passwd:     'files sss'
      
              nsswitch::shadow:     'files sss'
      
      
      

      And then looking at the nsswitch.pp file:

      
              ### nsswitch.config setup
      
              class profile::linux::base::nsswitch {
      
              # Get heira values
      
                class { 'nsswitch':
      
                  passwd    => [lookup('nsswitch::passwd')],
      
                  shadow    => [lookup('nsswitch::shadow')],
      
      
      

      Simple enough to call the values I want and works how I want, now I'm trying to do the same type of thing for PAM using the ghoneycutt/pam module and there doesn't seem to be much info on how to use it, or it's just not sinking in for me.

      Some of my PAM Heira values:

              pam::pam_auth_lines:
                - '# Managed by Hiera key pam::pam_auth_lines'
                - 'auth        required      pam_env.so'
                - 'auth        sufficient    pam_fprintd.so'
                - 'auth        sufficient    pam_unix.so nullok try_first_pass'
                - 'auth        requisite     pam_succeed_if.so uid >= 500 quiet'
                - 'auth        sufficient    pam_sss.so use_first_pass'
                - 'auth        required      pam_deny.so'
              pam::pam_account_lines:
                - '# Managed by Hiera key pam::pam_account_lines'
                - 'account     required      pam_unix.so'
                - 'account     sufficient    pam_localuser.so'
                - 'account     sufficient    pam_succeed_if.so uid < 500 quiet'
                - 'account     [default=bad success=ok user_unknown=ignore] pam_sss.so'
                - 'account     required      pam_permit.so'
              pam::pam_password_lines:
                - '# Managed by Hiera key pam::pam_password_lines'
                - 'password    requisite     pam_cracklib.so try_first_pass retry=3 type='
                - 'password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok'
                - 'password    sufficient    pam_sss.so use_authtok'
                - 'password    required      pam_deny.so'
      

      Some things I've tried:

      1:

              class profile::linux::base::pam {
                # resources
                class { 'pam':
                  password-auth-ac  => [
                    lookup('pam::pam_auth_lines')],
                    lookup('pam::pam_account_lines')],
                    lookup('pam::pam_password_lines')],
                    lookup('pam::pam_session_lines')],
                 }
      
      

      2:

      
      	
      	      passwd  => [
      	
      	      lookup('pam::pam_auth_lines'),
      	
      	      lookup('pam::pam_account_lines'),
      	
      	      lookup('pam::pam_password_lines'),
      	
      	      lookup('pam::pam_session_lines'),
      	
      	      ],
      	
      	  }
      
      
              include ::pam
      
      	class profile::linux::base::pam {
      	
      	  # resources
      	
      	    include ::pam
      
      	         lookup('pam::pam_auth_lines')
      	
      	}
      
      
      

      I've tried a few other ways and can't get it to work as I want it to. Can anyone help?

      Thanks

      4 votes
    45. I'm gonna start as an algorithms monitor at my college, looking for tips on how to better help the students

      I don't know what is the correct word in English, but I'll be one of those guys who will teach a "class" consisting on answering questions and guiding them through the exercises. The content is...

      I don't know what is the correct word in English, but I'll be one of those guys who will teach a "class" consisting on answering questions and guiding them through the exercises.

      The content is very basic algorithms in C, so things like functions, pointers, and structs are off the scope. Here is the repo I made with the solutions for last semester. I'm starting in the second semester, so I have everything fresh in my memory.

      I welcome anything you can give but I'm not necessarily seeking technical advice since the teachers have that covered. What I'd really like to know is what you consider to be some good examples, attitudes, and approaches for this particular position. Thanks.

      7 votes
    46. On hiring for tech positions: How do you get what you need from the HR department?

      I wish I had a dollar for every time I heard a manager complain, “The HR department included ‘must have college degree’ in the job req even though I don’t care” or “They asked for 5 years of...

      I wish I had a dollar for every time I heard a manager complain, “The HR department included ‘must have college degree’ in the job req even though I don’t care” or “They asked for 5 years of experience in a technology that’s only been around for 3” or “I have no idea why they rejected this candidate without even contacting me.”

      Still, in many cases you don’t have a choice. If you want to hire someone, you need to deal with HR, at least to a small degree – especially if you work in a big company.

      So I’m writing a feature story for technology managers, collecting real-world advice from people who learned their lessons the hard way. Here’s the questions I’d like you to answer:

      • Tell me about a frustration you had with the HR department (in regard to hiring). That is, tell me a personal story of HR-gone-wrong. Because we all love schadenfreude, and that gives me an emotional example with which to begin.
      • Let’s say you have a new opening in your department. In what ways do you involve HR? (That could be anything from, “give them general guidelines and let them choose the best candidates for me to interview” to “I do the search myself, and use HR only for on-boarding.”) What makes you choose that path? How much choice do you have in the matter?
      • What weaknesses have you discovered in your HR department’s ability to serve the needs of a tech-focused department?
      • What have you done to cope with those weaknesses? Which of those efforts worked, and which failed?
      • What do you wish you knew “n” years ago about dealing with your company’s HR department?
      • So that I can give the reader some context: Let me know how to refer to you in the article (at least, “Esther, a software architect at a Midwest insurance company”), and give me some idea of your company size (because the processes appropriate for a 70-person company aren’t the same for one with 7,000 employees).

      You don’t have to answer all those questions! I asked these to get the conversation going. Tell me as much or as little as you like.

      Please don’t assume that I think HR always sucks. However, there isn’t as much to learn from “why HR is your friend.” The idea here is to help techie managers cope when HR doesn’t offer what you hoped for.

      16 votes
    47. Cheapest way to put a hard drive on the internet.

      I'm currently researching the cheapest off site backup system and it looks like leaving a hdd at a friends house is the best option. The only thing I am stuck on is how to access it remotely. I...

      I'm currently researching the cheapest off site backup system and it looks like leaving a hdd at a friends house is the best option. The only thing I am stuck on is how to access it remotely. I need a system on a chip that I can plug in to the hdd and Ethernet and that provides ssh access. My first thought was a raspberry pi with a sata to usb cable but since I will only be doing weekly backups it makes no sense to keep the drive spinning 24/7. I need some way to turn off the drive and then back on over the internet. From what I understand there are linux programs that can do it but only directly over sata because the command doesn't work on usb sata controllers.

      What I need is a cheap linux SoC that has sata and ethernet. Does anyone have any ideas?

      13 votes