Readit News logoReadit News
i15e commented on WinDirStat – Windows Directory Statistics   windirstat.net/... · Posted by u/whereistimbo
mlrtime · a year ago
Hijacking this comment...

Does anyone know anything close to WinDirStat for google drive? I really need something like this.

i15e · a year ago
You could install the Google Drive client and then run WinDirStat against the virtual drive letter that it creates:

https://support.google.com/drive/answer/10838124

i15e commented on What We're Working on in Firefox   connect.mozilla.org/t5/di... · Posted by u/ReadCarlBarks
jszymborski · a year ago
Vertical/Grouped tabs would be major. All I want after that is a way to switch profiles from the browser like literally any other browser does.
i15e · a year ago
In Firefox you can go to about:profiles to easily open new windows using other profiles. I bookmark that page with a keyword for quick access. (Also see about:about for a list of other handy 'about' pages)

A more classic-style profile switcher is available via the '-P' (or '-ProfileManager') command-line switch. If FF is in your $PATH you can run:

  firefox -P
The '-P' switch can also take an argument of a profile name to open it directly.

But yes, it would be nice if at least one of these options were exposed in the UI so it was more discoverable by users.

i15e commented on Beej's Quick Guide to GDB (2009)   beej.us/guide/bggdb/... · Posted by u/mooreds
the-smug-one · 2 years ago
I wish that there was a performant and useful front end to GDB for Linux. There isn't, so I'm stuck using GDB manually. Maybe CLion is good?
i15e · 2 years ago
gf2 is worth looking at: https://github.com/nakst/gf
i15e commented on Exploratory data analysis for humanities data   awk.dev/eda.html... · Posted by u/yarapavan
mbb70 · 2 years ago
I'm all for this kind of exploratory hacking around before booting up python/R/Excel/duckdb, especially in constrained environments. A classic pain point is having to deal with column numbers, so I'll share my favorite trick:

`head -n1 /path/to/file.csv | tr ',' '\n' | nl | grep desired_column`

gives you the column number of desired_column

i15e · 2 years ago
Something to watch out for with nl is that by default it doesn't number empty lines. e.g.:

  $ printf 'one\n\nthree\n' | nl
     1  one

     2  three
Set -ba to enable numbering all lines.

For this use case I usually end up running cat -n instead since I find it easier to remember.

i15e commented on A terminal case of Linux   fasterthanli.me/articles/... · Posted by u/luu
pxc · 2 years ago
Yep, what I had would definitely eat it under either of at least two conditions: too many files and whitespace in filenames.

Your correction fixes both of those issues (the former through using xargs and the latter by splitting the arguments passed to it on the nul character instead of the default (newline, right?)).

i15e · 2 years ago
Your original command should work fine.

find does not pass arguments through an intermediate shell, so there are no quoting concerns with regard to spaces in filenames, etc.

And with the form of -exec terminated by a ; it runs a single command for each matching filesystem entry, so there will be no issues with exceeding the maximum argument size.

You can verify via strace:

  $ touch 'a b.md' 'c d.md'
  $ strace -fe execve find . -iname '*.md' -exec unbuffer ls {} \;
At the end of the exec chains you should see the following:

  execve("/bin/ls", ["ls", "./c d.md"] ...
  execve("/bin/ls", ["ls", "./a b.md"] ...
The filenames are being passed through spaces and all.

However if this were a real scenario, a better solution might be:

  find . -iname '*.md' -exec unbuffer ls -1 {} +
(Look up the -1 flag for ls, and the + variant of -exec for find for details)

i15e commented on Teleforking a Process onto a Different Computer   thume.ca/2020/04/18/telef... · Posted by u/trishume
TazeTSchnitzel · 5 years ago
In essence this is manually implementing forking — spawning a new process and copying the bytes over without getting the kernel to help you, except over a network too.

It reminds me a bit of when I wanted to parallelise the PHP test suite but didn't want to (couldn't?) use fork(), yet I didn't want to substantially rewrite the code to be amenable to cleanly re-initialising the state in the right way. But conveniently, this program used mostly global variables, and you can access global variables in PHP as one magic big associative array called $GLOBALS. So I moved most of the program's code into two functions (mostly just adding the enclosing function declaration syntax and indentation, plus `global` imports), made the program re-invoke itself NPROCS times mid-way, sending its children `serialize($GLOBALS)` over a loopback TCP connection, then had the spawned children detect an environment variable to receieve the serialized array over TCP, unserialize() it and copy it into `$GLOBALS`, and call the second function… lo and behold, it worked perfectly. :D (Of course I needed to make some other changes to make it useful, but they were also similar small incisions that tried to avoid refactoring the code as much as possible.)

PHP's test suite uses this horrible hack to this day. It's… easier than rewriting the legacy code…

i15e · 5 years ago
I did something similar using the 'at' daemon's 'now' time specification to "fork" off background tasks from a web request using the same .php file. It actually worked well for what I needed at the time!
i15e commented on Tell HN: Toilet paper, hand sanitizer, and now web cams    · Posted by u/awaythrower
taborj · 5 years ago
See the thread above about DroidCam (also on the Play Store). The Windows client loads a virtual camera driver that connects to the stream. You may be able to use it with other IP cameras, I haven't tried that yet.
i15e · 5 years ago
Another plus of DroidCam is that it supports streaming the video over USB so no WiFi is necessary.

u/i15e

KarmaCake day20January 5, 2020View Original