HNHacker News
TopNewBestAskShowJobs

notpublic

173 karma · joined December 8, 2018

submissionscomments
notpublic··on Practical Deep Learning for Coders 2022
First of all, a big thanks!

What is your take on the current state of autonomous driving? Do you think we can achieve "full autonomy" with the technology we have currently?

Any new advances in DL that you are excited about?

notpublic··on Framework Laptop with Ubuntu Review
I have been using mine (64GB with Ubuntu 21.04, Gnome Flashback) for the past several months as my primary work laptop. I have not experienced any of the issues you mention. I like it so far. In fact, hardly notice it. Except maybe when I do sudo/login. I can use my fingerprint instead of password :). My earlier laptop was a 2012 MacBook Pro which gave up last year. I do have an M1 which is used exclusively for iOS dev.

I did have to tweak few things mentioned in their community page/forum to get everything working.

Two issues (which hasn't bothered me yet)

  - battery drain during suspend
  - gnome not supporting different scaling with multiple monitors (fixed in later version of gnome as I understand)
edit: formatting
notpublic··on $ sudo rm -rf / === NPM install
Fair enough. I meant easy as in without installing any additional software, minimal config and ease of use.

AppArmor has come a long way. It's worth learning about it. They have quite a few builtin profiles that you can take advantage of.

notpublic··on $ sudo rm -rf / === NPM install
If you are on a linux distro that supports apparmor (ubuntu/debian etc), such issues can be easily prevented by creating a sandbox profile and alias commands like node/npm to run using it.

  alias npm='aa-exec -p sandbox npm'
  alias node='aa-exec -p sandbox node'
sandbox profile:

  # /etc/apparmor.d/sandbox
  include <tunables/global>

  profile sandbox {
    #include <abstractions/base>
    #include <abstractions/consoles>
    #include <abstractions/nameservice>

    /sys/** r,
    /{usr/,}bin/* ixr,

    # nodejs install dir
    owner /home/*/nodejs/**/* rix,

    owner /tmp/**           rw,
    owner /tmp/**/          rw,

    owner /home/*/.npm/_* lrw,
    owner /home/*/.npm/_*/ lrw,
    owner /home/*/.npm/_*/** lrw,
    owner /home/*/.npmrc r,

    owner /home/**/node_modules/ rwix,
    owner /home/**/node_modules/** rwix,
    owner /home/**/package.json rw,
    owner /home/**/package-lock.json rw,

    owner /home/*/projects/**/ r,
    owner /home/*/projects/** r,
  }
To load the profile:

sudo apparmor_parser -r /etc/apparmor.d/sandbox

edit: For completeness, added step to load the profile.

notpublic··on Embedded Malware in Coa
Good point and nice script. I am going to use it in my projects.

I wish package.json had an option where I could explicitly mark which packages can run postinstall scripts.

notpublic··on Embedded Malware in Coa
You can find out which packages require postinstall scripts and then run them manually:

  $ grep postinstall node_modules/*/package.json
  node_modules/esbuild/package.json:    "postinstall": "node install.js"
  $ cd node_modules/esbuild
  $ npm run postinstall
notpublic··on Home Gardening
Talking about tomatoes, highly recommend watching this episode of Growing a Greener World.

https://www.growingagreenerworld.com/episode-803-epic-tomato...

https://www.craiglehoullier.com/resources-videos-etc

notpublic··on Malicious NPM package opens backdoors on programmers' computers
There is no easy way to do it. Wish yarn/npm had an --allow-scripts flag.

Anyway, this is what you could do. Find out which packages require postinstall scripts and then run it manually:

  $ grep postinstall node_modules/**/package.json
  node_modules/node-sass/package.json:    "postinstall": "node scripts/build.js",
  $ cd node_modules/node-sass/
  $ yarn run postinstall
On the positive side, you get to know more about the dependency that you are trying to add :)
notpublic··on Malicious NPM package opens backdoors on programmers' computers
One can protect from these kinds of vulnerabilities by setting ignore-scripts to true as default:

  npm config set ignore-scripts true

  yarn config set ignore-scripts true
https://blog.npmjs.org/post/141702881055/package-install-scr...
notpublic··on ReMarkable MicroSD (2019)
It does. You can connect USB flash drive for e.g. You have to ssh and manually mount the drive though. Unfortunately, the existing xochitl app doesn't seem to show additional mounts. However, you can write your own scripts/code to take advantage of it.

The OS has udev and systemd support and it's very easy to cross compile code with arm-linux-gnueabihf-gcc. I was able to build static binaries of packages with just the following option:

  ./configure --target=arm-linux-gnueabi --host=arm-linux-gnueabi --build=x86_64-linux  CFLAGS="-static"
  make LDFLAGS="-static"
You have low level access to buttons, framebuffer, touch events etc as well. You can do all kinds of interesting things with that.
← PreviousPage 3 of 3