• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. How to make money with Wordpress

      I have just graduated from uni, and am preparing for masters next fall. I'm a humanities student, but have some programming knowledge. Currently I'm looking for literary translation jobs, but...

      I have just graduated from uni, and am preparing for masters next fall. I'm a humanities student, but have some programming knowledge. Currently I'm looking for literary translation jobs, but should I fail that, I want to find some light freelance work (so that I can spare more time to my studies), and looking at e.g. freelancer.com, Wordpress is still quite popular.

      What are some good introductory material for Wordpress and PHP, that preferably does not assume total beginner to programming? How much can I expect to make, for how much effort? I'd be content if I could make $200-250 w/ 3-5hr work per day, or a couple full days a week, that's all I really need and such hours would mean that I could keep on doing such work even when I'm writing my thesis. I'm in Turkey, FWIW.

      7 votes
    2. What SSD should I buy?

      Right now I have this SSD and apparently it's pretty outdated. I wanted to get a 500GB one that's quite a bit faster without being too expensive (so less than $100 at the least.) Any suggestions?

      10 votes
    3. Let's talk Puppy Linux

      For the uninitiated, you can visit puppylinux.org to get to know more about it. My first experience with Puppy wasn't good, since, for the life of me, I couldn't get the saves working. I still...

      For the uninitiated, you can visit puppylinux.org to get to know more about it.

      My first experience with Puppy wasn't good, since, for the life of me, I couldn't get the saves working. I still didn't, but I found that xenialpup does work for some reason, so I stuck with it.

      After that, it's been great, and although I don't like the UI and some of the default apps, it worked on every computer I've tried it on, and it's light enough to run well on ancient computers.

      As far as the tools go, it has everything I need to do my work, even if I'd prefer different tools (like vim and ranger).

      That is, of course, only a problem with the default configuration, and Puppy has a very convenient tool to remaster itself, which I'll be using these holidays. It's great to be able to build a more welcoming version for yourself without needing any knowledge or spending a lot of time.

      So, I just wanted to see what was your experience with Puppy, or, if you haven't tried it, what you think about it.

      9 votes
    4. Let's talk browsers

      I've tried a lot of browsers. Starting from Chrome, to Chromium, to Firefox, to Links, to w3m, to, eventually, Qutebrowser, which I use for most of my browsing now. At least for me, I had four...

      I've tried a lot of browsers. Starting from Chrome, to Chromium, to Firefox, to Links, to w3m, to, eventually, Qutebrowser, which I use for most of my browsing now.

      At least for me, I had four things in mind while choosing a browser:

      • I want it to be light
      • I want it to be minimal
      • I want it to be keyboard-oriented
      • I want it to be able to use modern websites

      I won't be going through all the browsers I've tried, but those I mentioned are the big ones, so I'll just do a quick check-list of these things.

      Chrome/Chromium:

      • Weighs like a sumo wrestler 1/5
      • Cluttered 1/5
      • Just some shortcuts and extentions 3/5
      • The model, the idol to strife for 5/5

      Firefox:

      • Apparently lighter than Chromium, though not by much 1/5
      • Cluttered 1/5
      • Some shortcuts, famous extensions 3/5
      • On point 5/5

      Links:

      • Very light and fast 5/5
      • Minimal, though can go smaller 4/5
      • Yes 5/5
      • Doesn't support javascript 1/5

      w3m:

      • As light as it gets 6/5
      • Pretty damn minimal 5/5
      • Even works for blind 5/5
      • Does javascript, but hard to use with cluttered wesites like Reddit or any news site 3/5

      Qutebrowser:

      • It is quite small and feels fast 4/5
      • Can be easily modified to not have anything on screen, and command line-like controls 5/5
      • Great, but hint system fails with javascript 4/5
      • Doesn't work with Reddit, for some reason 4/5

      With the things that I look for, Qutebrowser is the answer, with w3m being the close second. Of course, there are different things to look for in a piece of software, and you may want the extra stability and extensions Firefox provides, or privacy of Tor browser, or the suckless nature of surf, so I'd like to hear what is your browser of choice!

      17 votes
    5. JMAP is on the home straight

      https://fastmail.blog/2018/12/27/jmap-is-on-the-home-straight/ Highly recommend to read the Dec 2014 post on what JMAP attempts to solve:...

      https://fastmail.blog/2018/12/27/jmap-is-on-the-home-straight/

      Highly recommend to read the Dec 2014 post on what JMAP attempts to solve: https://fastmail.blog/2014/12/23/jmap-a-better-way-to-email/

      UI changes on FastMail, making use of JMAP: https://www.fastmail.com/help/guides/interfaceupdate-2018.html

      The JMAP spec and documentation: https://jmap.io/

      15 votes
    6. Need help with Switching to linux

      Hi all, Hope ya'll doing good. I am done with windows. So I want to switch to linux. I have used it a few times. I just wanted to know, how long will it take to have it setup? Also, I am learning...

      Hi all, Hope ya'll doing good. I am done with windows. So I want to switch to linux. I have used it a few times. I just wanted to know, how long will it take to have it setup? Also, I am learning data science. Will switching to linux have any serious implications? Thanks

      29 votes
    7. 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
    8. Is my kernel ready for CGroups V2?

      So I am reading the cgroups manpage because I want to learn about... cgroups. It tells me that for CGroups V1, if I want to use specific features, my kernel needs to be configured. Either I missed...

      So I am reading the cgroups manpage because I want to learn about... cgroups. It tells me that for CGroups V1, if I want to use specific features, my kernel needs to be configured. Either I missed a section or it isn't there, because I don't see much mention of kernel requirements for CGroups V2.

      So, my question is, is my kernel ready for CGroups, or should I recompile? Should I be able to support both V1 and V2? The manpage says V1 was a heap, so I was thinking I might continue without it... ... ...

      CONFIG_CGROUPS=y

      # CONFIG_BLK_CGROUP is not set

      CONFIG_CGROUP_SCHED=y

      # CONFIG_CGROUP_PIDS is not set

      # CONFIG_CGROUP_RDMA is not set

      CONFIG_CGROUP_FREEZER=y

      # CONFIG_CGROUP_HUGETLB is not set

      # CONFIG_CGROUP_DEVICE is not set

      CONFIG_CGROUP_CPUACCT=y

      # CONFIG_CGROUP_PERF is not set

      # CONFIG_CGROUP_DEBUG is not set

      # CONFIG_NET_CLS_CGROUP is not set

      # CONFIG_CGROUP_NET_PRIO is not set

      # CONFIG_CGROUP_NET_CLASSID is not set

      edit: wowie markdown fix

      4 votes
    9. How do I hack makefiles?

      If you have built from source, then you know the relief when nothing interesting comes out of ./configure && make && make install. In fact, the less interesting the output of these commands, the...

      If you have built from source, then you know the relief when nothing interesting comes out of ./configure && make && make install. In fact, the less interesting the output of these commands, the better.

      But occasionally, the source build process is so horrifying that you end up having to modify the configure script or makefile yourself.

      So far I have only been able to do this when I was lucky enough to find some poor, destitute stranger who had pretty much the same problem as me ( most recent I can think of is GNUTLS, where I had to adjust the version requirements for nettle ) and that is a problem -- there must be some way to learn this myself.

      Is this just something that comes with time and experience, or does anyone have a reliable guide or resource for modifying makefiles and configure scripts? I would appreciate advice / discussion: I am tired of "getting lucky" with these!

      15 votes
    10. Linux from Scratch is one of the best things I ever did.

      If you have never built one, you should -- it gives an in depth look at how different parts of linux interact with each other. Some of the methods used are outdated to be sure, but the first...

      If you have never built one, you should -- it gives an in depth look at how different parts of linux interact with each other. Some of the methods used are outdated to be sure, but the first system is meant to be minimal, and a good base on which to build. I am lately working on a 'BLFS', and I'm learning even more.

      Now, if I could just nail down networking ... ... ...

      Any LFS experiences?

      23 votes
    11. Best 120mm fans for a desktop?

      I was looking for preferences on 120/140mm case fans. RGB is a want, but not at the expense of quality fans. I'm pretty new to the topic and not super familiar with the technical side. So open to...

      I was looking for preferences on 120/140mm case fans. RGB is a want, but not at the expense of quality fans.

      I'm pretty new to the topic and not super familiar with the technical side. So open to reading more in depth too.

      Thanks!

      7 votes
    12. What does your desktop look like? What tools do you swear by?

      Between the recent discussions on the Useful Shell Scripts thread, and some of the tangents on the Desktop Usability thread, I thought it might be an interesting idea to have a desktop screenshot...

      Between the recent discussions on the Useful Shell Scripts thread, and some of the tangents on the Desktop Usability thread, I thought it might be an interesting idea to have a desktop screenshot sharing / unixporn thread where we talk about our setups, preferred applications, and share some pointers. This doesn't specifically have to be a Unix circlejerk though. If you have a Windows/Android/ChromeOS/TempleOS setup with some novel innovations, you're more than welcome to share too.

      34 votes
    13. Programming Challenge - It's raining!

      Hi everyone, it's been 12 days since last programming challenge. So here's another one. The task is to make an algorithm that'll count how long would it take to fill system of lakes with water....

      Hi everyone, it's been 12 days since last programming challenge. So here's another one. The task is to make an algorithm that'll count how long would it take to fill system of lakes with water.

      It's raining in the forest. The forest is full of lakes, which are close to each other. Every lake is below the previous one (so 1st lake is higher than 2nd lake, which is higher than 3rd lake). Lakes are empty at the beginning, and they're filling at rate of 1l/h. Once a lake is full, all water that'd normally fall into the lake will flow to the next lake.

      For example, you have lakes A, B, and C. Lake A can hold 1 l of water, lake B can hold 3 l of water and lake C can hold 5 l of water. How long would it take to fill all the lakes?
      After one hour, the lakes would be: A (1/1), B (1/3), C(1/5). After two hours, the lakes would be: A(1/1), B(3/3), C(2/5) (because this hour, B received 2l/h - 1l/h from the rain and 1l/h from lake A). After three hours, the lakes would be: A(1/1), B(3/3), C(5/5). So the answer is 3. Please note, that the answer can be any rational number. For example if lake C could hold only 4l instead of 5, the answer would be 2.66666....

      Hour 0:

      
      \            /
        ----(A)----
                             \                /
                              \              /
                               \            /
                                ----(B)----
                                                   \           /
                                                    \         /
                                                     \       /
                                                     |       |
                                                     |       |
                                                      --(C)--
      

      Hour 1:

      
      \============/
        ----(A)----
                             \                /
                              \              /
                               \============/
                                ----(B)----
                                                   \           /
                                                    \         /
                                                     \       /
                                                     |       |
                                                     |=======|
                                                      --(C)--
      

      Hour 2:

                  ==============
      \============/           |
        ----(A)----            |
                             \================/
                              \==============/
                               \============/
                                ----(B)----
                                                   \           /
                                                    \         /
                                                     \       /
                                                     |=======|
                                                     |=======|
                                                      --(C)--
      

      Hour 3:

                  ==============
      \============/           |
        ----(A)----            |             ========
                             \================/       |
                              \==============/        |
                               \============/         |
                                ----(B)----           |
                                                   \===========/
                                                    \=========/
                                                     \=======/
                                                     |=======|
                                                     |=======|
                                                      --(C)--
      

      Good luck everyone! Tell me if you need clarification or a hint. I already have a solution, but it sometimes doesn't work, so I'm really interested in seeing yours :-)

      21 votes
    14. Share your useful shell scripts!

      Disclaimer: Don't run scripts offered to you by randos unless you trust them or review it yourself I use this constantly, it just plays music by file name, specifically matching *NAME* with...

      Disclaimer: Don't run scripts offered to you by randos unless you trust them or review it yourself

      I use this constantly, it just plays music by file name, specifically matching *NAME* with case-insensitivity. Requires bash 4.something.

      # play -ln SONGS ...
      # -l don't shuffle
      # -n dry run
      mpv_args="--no-audio-display --no-resume-playback \
                --msg-level=all=status --term-osd-bar"
      shopt -s globstar nullglob nocaseglob
      
      shuffle=true
      dry=false
      while [[ "$1" == -* ]]; do
          if [[ "$1" == "-l" ]]; then 
              shuffle=false
          elif [[ "$1" == "-n" ]]; then
              dry=true
          fi
      
          shift 1
      done
      
      if [[ "$shuffle" == true ]]; then
          mpv_args="--shuffle $mpv_args"
      fi
      
      songs=()
      while [[ "$#" != 0 ]]; do
          songs+=( ~/music/**/**/*"$1"*.* ) # change this to match your music directory layout
          shift 1                                               # could probably use find instead
      done
      
      if [[ "$dry" == true ]]; then
          if [[ "$shuffle" == true ]]; then
              printf "Shuffle mode is on\n"
          fi
      
          for song in "${songs[@]}"; do
              printf "$song\n"
          done
        
          exit
      fi
      
      if [[ ${#songs[@]} != 0 ]]; then
          mpv $mpv_args "${songs[@]}"
      fi
      

      I make no claims to the quality of this but it works!

      36 votes
    15. Where would a beginner start with data compression? What are some good books for it?

      Mostly the title. I have experience with Python, and I was thinking of learning more about data compression. How should I proceed? And what are some good books I could read, both about specifics...

      Mostly the title. I have experience with Python, and I was thinking of learning more about data compression. How should I proceed? And what are some good books I could read, both about specifics and abstracts of data compression, data management, data in general.

      15 votes
    16. An Alternative Approach to Configuration Management

      Preface Different projects have different use cases that can ultimately result in common solutions not suiting your particular needs. Today I'm going to diverging a bit from my more abstract,...

      Preface

      Different projects have different use cases that can ultimately result in common solutions not suiting your particular needs. Today I'm going to diverging a bit from my more abstract, generalized topics on code quality and instead focus on a specific project structure example that I encountered.


      Background

      For a while now, I've found myself being continually frustrated with the state of my project configuration management. I had a single configuration file that would contain all of the configuration options for the various tools I've been using--database, API credentials, etc.--and I kept running into the problem of wanting to test these tools locally while not inadvertently committing and pushing sensitive credentials upstream. For me, part of my security process is ensuring that sensitive access credentials never make it into the repository and to limit access to these credentials to only people who need to be able to access them.


      Monolithic Files Cause Monolithic Pain

      The first thing I realized was that having a single monolithic configuration file was just terrible practice. There are going to be common configuration options that I want to have in there with default values, such as local database configuration pointing to a database instance running on the same VM as the application. These should always be in the repo, otherwise any dev who spins up an instance of the VM will need to manually tread documentation and copy-paste the missing options into the configuration. This would be incredibly time-consuming, inefficient, and stupid.

      I also use different tools which have different configuration options associated with them. Having to dig through a single file containing configuration options for all of these tools to find the ones I need to modify is cumbersome at best. On top of that, having those common configuration options living in the same place that sensitive access credentials do is just asking for a rogue git commit -A to violate the aforementioned security protocol.


      Same Problem, Different Structure

      My first approach to resolving this problem was breaking the configuration out into separate files, one for each distinct tool. In each file, a "skeleton" config was generated, i.e. each option was given a default empty value. The main config would then only contain config options that are common and shared across the application. To avoid having the sensitive credentials leaked, I then created rules in the .gitignore to exclude these files.

      This is where I ran into problem #2. I learned that this just doesn't work. You can either have a file in your repo and have all changes to that file tracked, have the file in your repo and make a local-only change to prevent changes from being tracked, or leave the file out of the repo completely. In my use case, I wanted to be able to leave the file in the repo, treat it as ignored by everyone, and only commit changes to that file when there was a new configuration option I wanted added to it. Git doesn't support this use case whatsoever.

      This problem turned out to be really common, but the solution suggested is to have two separate versions of your configuration--one for dev, and one for production--and to have a flag to switch between the two. Given the breaking up of my configuration, I would then need twice as many files to do this, and given my security practices, this would violate the no-upstream rule for sensitive credentials. Worse still, if I had several different kinds of environments with different configuration--local dev, staging, beta, production--then for m such environments and n configuration files, I would need to maintain n*m separate files for configuration alone. Finally, I would need to remember to include a prefix or postfix to each file name any time I needed to retrieve values from a new config file, which is itself an error-prone requirement. Overall, there would be a substantial increase in technical debt. In other words, this approach would not only not help, it would make matters worse!


      Borrowing From Linux

      After a lot of thought, an idea occurred to me: within Linux systems, there's an /etc/skel/ directory that contains common files that are copied into a new user's home directory when that user is created, e.g. .bashrc and .profile. You can make changes to these files and have them propagate to new users, or you can modify your own personal copy and leave all other new users unaffected. This sounds exactly like the kind of behavior I want to emulate!

      Following their example, I took my $APPHOME/config/ directory and placed a skel/ subdirectory inside, which then contained all of the config files with the empty default values within. My .gitignore then looked something like this:

      $APPHOME/config/*
      !$APPHOME/config/main.php
      !$APPHOME/config/skel/
      !$APPHOME/config/skel/*
      # This last one might not be necessary, but I don't care enough to test it without.
      

      Finally, on deploying my local environment, I simply include a snippet in my script that enters the new skel/ directory and copies any files inside into config/, as long as it doesn't already exist:

      cd $APPHOME/config/skel/
      for filename in *; do
          if [ ! -f "$APPHOME/config/$filename" ]; then
              cp "$filename" "$APPHOME/config/$filename"
          fi
      done
      

      (Note: production environments have a slightly different deployment procedure, as local copies of these config files are saved within a shared directory for all releases to point to via symlink.)

      All of these changes ensure that only config/main.php and the files contained within config/skel/ are whitelisted, while all others are ignored, i.e. our local copies that get stored within config/ won't be inadvertently committed and pushed upstream!


      Final Thoughts

      Common solutions to problems are typically common for a good reason. They're tested, proven, and predictable. But sometimes you find yourself running into cases where the common, well-accepted solution to the problem doesn't work for you. Standards exist to solve a certain class of problems, and sometimes your problem is just different enough for it to matter and for those standards to not apply. Standards are created to address most cases, but edge cases will always exist. In other words, standards are guidelines, not concrete rules.

      Sometimes you need to stop thinking about the problem in terms of the standard approach to solving it, and instead break it down into its most abstract, basic form and look for parallels in other solved problems for inspiration. Odds are the problem you're trying to solve isn't as novel as you think it is, and that someone has probably already solved a similar problem before. Parallels, in my experience, are usually a pretty good indicator that you're on the right track.

      More importantly, there's a delicate line to tread between needing to use a different approach to solving an edge case problem you have, and needing to restructure your project to eliminate the edge case and allow the standard solution to work. Being able to decide which is more appropriate can have long-lasting repercussions on your ability to manage technical debt.

      16 votes
    17. As someone with ADHD, I hate the "RTFM" motto

      I'm a student of software engineering. I'm not a programmer yet, but I use software that is common among this crowd, like i3wm, Neovim and Emacs. I know how to find and read documentation. I've...

      I'm a student of software engineering. I'm not a programmer yet, but I use software that is common among this crowd, like i3wm, Neovim and Emacs. I know how to find and read documentation. I've read the obnoxious How To Ask Questions the Smart Way. Every time I encounter an issue, I do my diligence. I go through the manuals, I google, I read the docs. My main editor, Emacs, has an extensive manual, with plenty of accurate details. I get that's a huge program (more like a platform, really), but let's just say that a black-and-white 650 pages PDF is not the most ADHD friendly thing in the world.

      I'm aware that I chose a career that requires plenty of reading, but I happen to like it a lot and it seems like I have some aptitude for it. I had similar issues in my previous activities anyway. But it's discouraging trying to understand programming and complex software, only to be repelled by people who think everyone has their ability for concentration. Sometimes I completely lose track of time. I can sit on my computer and hyperfocus for up to 48 hours with 20 Chrome tabs open non-stop and Netflix on the background. I may seem productive, but I'm not reading anything. Maybe I read one paragraph or two, and 30 seconds later I can't remember what I was doing. But I still have tasks to accomplish, and sometimes I need help to find useful information on a 700 pages manual.

      Luckily I have a great support and determination and have accomplished a lot, but my peers have no idea what I went through to get to where I am. What I don't have in natural born skills I compensate with a lot of raw effort. Everyone has their difficulties and I'm not seeking compassion, but I'd like to suggest people think twice before dismissing as "lazy" someone you know nothing about. That person might have a mental disorder, a reading disorder or even an intellectual disability. Do you wanna be the guy who told a dyslexic to just read the fucking manual?

      EDIT: of course I get that time and energy are limited commodities... my point is: don't be an asshole about it. Do what you can and you wanna do, but there's no need to use hostile buzzwords when you communicate with less knowledgeable people. You're not even forced to answer... I much prefer not getting an answer than getting a hostile one.

      26 votes