Gloriously good looking! I only answer to my inner monkey!🕹️
226 stories

ls* Commands Are Even More Useful Than You May Have Thought

1 Share

{Updated} Everything is a file under Linux and ls* and friends can help you to dig out more information from the system than you originally thought. These Linux tips may come in handy when you need to find out information quickly without going through /proc or sysfs.

The post ls* Commands Are Even More Useful Than You May Have Thought appeared first on nixCraft.
Read the whole story
504 days ago
Share this story

3D Printed Terminal Takes Computing Back in Time

1 Comment and 2 Shares

It’s hard to look at today as anything but the golden age of computing. Even entry level machines have quad-core processors and a terabyte or more of storage space, to say nothing of the incredible amount of tech packed into the modern smartphone. But even so, there’s something to be said for the elegant simplicity of early desktop computers.

Looking to recreate the feeling of those bygone days, [Pigeonaut] created the Callisto II. Its entirely 3D printed case snaps together without glue or screws, making it easy to assemble, and the parts have been sized so they’ll be printable even on smaller machines like the Prusa Mini. Inside you’ll find a 1024×768 Pimoroni HDMI 8″ IPS LCD, 60% mechanical keyboard, four-port USB 3 hub, Raspberry Pi 4, and a 22 watt USB power supply to run it all.

The internal components can be easily accessed with the hatch on the rear of the case, and there’s plenty of room inside to add new hardware should you want to toss in a hard drive or even swap out the Pi for a different single-board computer.

To really drive home the faux-retro concept of the Callisto II, [Pigeonaut] has created a website for the fictional computer company behind the machine, replete with all the trappings you’d expect from the early web. There’s even a web-based “operating system” you can use to show off your freshly printed Callisto II.

Incidentally the II suffix isn’t just part of the meme, there really was a Callisto before this one. We covered the earlier machine back in 2019, and while we’re a bit sad to see that the functional 3.5 inch floppy drive has been deleted, we can’t deny the overall aesthetics have been greatly improved in the latest version.

Read the whole story
505 days ago
Share this story
1 public comment
504 days ago
Earth, Sol system, Western spiral arm

Big list of HTTP static server one-liners

1 Share

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Python 3.x

$ python -m http.server 8000

Twisted (Python)

$ twistd -n web -p 8000 --path .


$ python -c 'from twisted.web.server import Site; from twisted.web.static import File; from twisted.internet import reactor; reactor.listenTCP(8000, Site(File(".")));'

Depends on Twisted.


$ ruby -rwebrick -e' => 8000, :DocumentRoot => Dir.pwd).start'

Credit: Barking Iguana

Ruby 1.9.2+

$ ruby -run -ehttpd . -p8000

Credit: nobu

adsf (Ruby)

$ gem install adsf   # install dependency
$ adsf -p 8000

Credit: twome

No directory listings.

Sinatra (Ruby)

$ gem install sinatra   # install dependency
$ ruby -rsinatra -e'set :public_folder, "."; set :port, 8000'

No directory listings.


$ cpan HTTP::Server::Brick   # install dependency
$ perl -MHTTP::Server::Brick -e '$s=HTTP::Server::Brick->new(port=>8000); $s->mount("/"=>{path=>"."}); $s->start'

Credit: Anonymous Monk

Plack (Perl)

$ cpan Plack   # install dependency
$ plackup -MPlack::App::Directory -e 'Plack::App::Directory->new(root=>".");' -p 8000

Credit: miyagawa

Mojolicious (Perl)

$ cpan Mojolicious::Lite   # install dependency
$ perl -MMojolicious::Lite -MCwd -e 'app->static->paths->[0]=getcwd; app->start' daemon -l http://*:8000

No directory listings.

http-server (Node.js)

$ npm install -g http-server   # install dependency
$ http-server -p 8000

Note: This server does funky things with relative paths. For example, if you have a file /tests/index.html, it will load index.html if you go to /test, but will treat relative paths as if they were coming from /.

node-static (Node.js)

$ npm install -g node-static   # install dependency
$ static -p 8000

No directory listings.

PHP (>= 5.4)

$ php -S

Credit: /u/prawnsalad and MattLicense

No directory listings.


$ erl -s inets -eval 'inets:start(httpd,[{server_name,"NAME"},{document_root, "."},{server_root, "."},{port, 8000},{mime_types,[{"html","text/html"},{"htm","text/html"},{"js","text/javascript"},{"css","text/css"},{"gif","image/gif"},{"jpg","image/jpeg"},{"jpeg","image/jpeg"},{"png","image/png"}]}]).'

Credit: nivertech (with the addition of some basic mime types)

No directory listings.

busybox httpd

$ busybox httpd -f -p 8000

Credit: lvm


$ webfsd -F -p 8000

Depends on webfs.

IIS Express

C:\> "C:\Program Files (x86)\IIS Express\iisexpress.exe" /path:C:\MyWeb /port:8000

Depends on IIS Express.

Credit: /u/fjantomen

No directory listings. /path must be an absolute path.

If you have any suggestions, drop them in the comments below or on the reddit discussion. To get on this list, a solution must:

  1. serve static files using your current directory (or a specified directory) as the server root,
  2. be able to be run with a single, one line command (dependencies are fine if they're a one-time thing),
  3. serve basic file types (html, css, js, images) with proper mime types,
  4. require no configuration (from files or otherwise) beyond the command itself (no framework-specific servers, etc)
  5. must run, or have a mode where it can run, in the foreground (i.e. no daemons)

Adblock test (Why?)

Read the whole story
505 days ago
Share this story

Neural implant lets paralyzed person type by imagining writing

1 Share
An artist's schematic of the system.
Enlarge / An artist's schematic of the system.

Elon Musk's Neuralink has been making waves on the technology side of neural implants, but it hasn't yet shown how we might actually use implants. For now, demonstrating the promise of implants remains in the hands of the academic community.

This week, the academic community provided a rather impressive example of the promise of neural implants. Using an implant, a paralyzed individual managed to type out roughly 90 characters per minute simply by imagining that he was writing those characters out by hand.

Dreaming is doing

Previous attempts at providing typing capabilities to paralyzed people via implants have involved giving subjects a virtual keyboard and letting them maneuver a cursor with their mind. The process is effective but slow, and it requires the user's full attention, as the subject has to track the progress of the cursor and determine when to perform the equivalent of a key press. It also requires the user to spend the time to learn how to control the system.

But there are other possible routes to getting characters out of the brain and onto the page. Somewhere in our writing thought process, we form the intention of using a specific character, and using an implant to track this intention could potentially work. Unfortunately, the process is not especially well understood.

Downstream of that intention, a decision is transmitted to the motor cortex, where it's translated into actions. Again, there's an intent stage, where the motor cortex determines it will form the letter (by typing or writing, for example), which is then translated into the specific muscle motions required to perform the action. These processes are much better understood, and they're what the research team targeted for their new work.

Specifically, the researchers placed two implants in the premotor cortex of a paralyzed person. This area is thought to be involved in forming the intentions to perform movements. Catching these intentions is much more likely to produce a clear signal than catching the movements themselves, which are likely to be complex (any movement involves multiple muscles) and depend on context (where your hand is relative to the page you're writing on, etc.).

With the implants in the right place, the researchers asked the participant to imagine writing letters on a page and recorded the neural activity as he did so.

What was that again?

Altogether, there were roughly 200 electrodes in the participant's premotor cortex. Not all of them were informative for letter-writing. But for those that were, the authors performed a principal component analysis, which identified the features of the neural recordings that differed the most when various letters were imagined. Converting these recordings into a two-dimensional plot, it was obvious that the activity seen when writing a single character always clustered together. And physically similar characters—p and b, for example, or h, n, and r—formed clusters near each other.

(The researchers also asked the participant to do punctuation marks like a comma and question mark and used a > to indicate a space and a tilde for a period.)

Overall, the researchers found they could decipher the appropriate character with an accuracy of a bit over 94 percent, but the system required a relatively slow analysis after the neural data was recorded. To get things working in real time, the researchers trained a recurrent neural network to estimate the probability of a signal corresponding to each letter.

Despite working with a relatively small amount of data (only 242 sentences' worth of characters), the system worked remarkably well. The lag between the thought and a character appearing on screen was only about half a second, and the participant was able to produce about 90 characters per minute, easily topping the previous record for implant-driven typing, which was about 25 characters per minute. The raw error rate was only about 5 percent, and applying a system like a typing autocorrect could drop the error rate down to only 1 percent.

The tests were all done with prepared sentences. Once the system was validated, however, the researchers asked the participant to type out free-form answers to questions. Here, the speed went down a bit (to 75 characters a minute) and errors went up to 2 percent after autocorrection, but the system still worked.

Not even a prototype

As the researchers themselves put it, this "is not yet a complete, clinically viable system." To begin with, it has only been used in a single individual, so we have no idea how well it might work for others. The simplified alphabet used here doesn't contain any digits, capital letters, or most forms of punctuation. And the behavior of the implants changes over time, perhaps because of minor shifts relative to the neurons they read or the build-up of scar tissue, so the system had to be recalibrated regularly—at least once per week to maintain a tolerable error rate.

That said, the system shows a very significant speed boost compared to previous implant-driven systems, and the accuracy is quite good. The system also has the potential to be similar to touch-typing, in that a user doesn't have to actually visually focus on letter production, allowing more normal interactions with the user's surroundings. The letter issue might be solved in part by using an alternate alphabet designed by the researchers, in which all the letters are defined by dissimilar patterns of strokes. There's a lot of potential here.

The experiments also provide a reminder of the potential of these implants more generally and why companies might start finding the technology worth commercializing.

Nature, 2021. DOI: 10.1038/s41586-021-03506-2  (About DOIs).

Adblock test (Why?)

Read the whole story
505 days ago
Share this story

LucasArts Classic Zombies Ate My Neighbors Returns To Consoles And PC Next Month


Because the dead never rest, Lucasfilm Games and developer Dotemu have teamed up to bring enhanced versions of 1993 16-bit classic Zombies Ate My Neighbors and its less-beloved sequel to PlayStation 4, Xbox One, Switch, and PC on June 29.


Read the whole story
506 days ago
Share this story

Why do older individuals have greater control of their feelings?

1 Share

When we are young, our skills tend to improve with age and experience. But once we are well into adulthood, it may start to feel as if it’s all downhill from there. With every advancing year, we become slightly more forgetful, somewhat slower to respond, a little less energetic.

Yet there is at least one important exception: In the emotional realm, older people rule supreme.

For the past 20 years, Susan Turk Charles, a psychologist at the University of California, Irvine, has been monitoring the shifting moods, the sense of satisfaction, the moments of contemplation and the occasional outbursts of anger, sadness and despair of people of all ages — with a special interest in how we handle and experience emotions as we grow older. She and her colleagues have found that, on average, older people have fewer but more satisfying social contacts and report higher emotional well-being.

What is the secret behind this grizzled levelheadedness? How can we make sure that as many people as possible can benefit from it? And what can it teach the young? In 2010, Charles and Stanford psychologist Laura Carstensen coauthored an article on social and emotional aging in the Annual Review of Psychology. We circled back to Charles to learn more about the phenomenon and how the research has unfolded. This conversation has been edited for length and clarity.

What makes a young scientist decide to specifically study the emotions of older people?

When I was an undergraduate, in the early ’90s, I was really interested in development. At that time, the scientific literature was saying that our personality and emotions were fully developed by the time we are 18. I heard this and thought, “Wow, the next 50 years, nothing gets better? This is it?” Then I took a class from Laura Carstensen at Stanford, and she was the first person to say that there was more development after age 18. She was finding that unlike physical fitness or cognition, where you may see slowing or declines, emotional regulation and experience are often as good, if not better, as we age. It was talking to her that got me excited about this field. I fell in love with the idea of studying a process related to aging that is not defined by a decline.

What might explain why aging brains get better at managing emotions?

Some neuroscientists believe that because we’re processing information a little slower with age, that makes us think before we act, instead of reacting quickly. We do see a decline with age in overall mass of the brain’s frontal lobe, the part that is responsible for emotion regulation, complex reasoning and speed of processing. But researchers such as Mara Mather at the University of Southern California find that older adults often exhibit greater prefrontal cortex activity than younger adults when processing emotions.

A lot of work has found that older people have a positive bias, even without realizing they’re actually doing this. Their default mode is, as we say, “Don’t sweat the small stuff.” We find that older people more often let go of a situation they experience as negative, especially with friends and family. So it is really picking their battles that we think older adults are better at. If you look at older adults who have cognitive decline, they are not defaulting to the positive.

Is there a certain age at which we reach a peak in emotional satisfaction?

It depends on what aspects you’re looking at, but the peak we see in terms of the highest positive and lowest negative emotions is between 55 and 70. Then there’s the measure of “life satisfaction,” which includes both happiness and sadness, as well as a cognitive evaluation of how your life is going. For that, we often see a little lower ratings in midlife, lowest among people who are in their early 50s, and then it goes up. So again, it’s higher with older age. Only after 75 do negative emotions start increasing again.

Susan Turk Charles speaks at this May 6, 2021 online event hosted by Knowable Magazine.

[embedded content]

Yet even centenarians, you write in your review, report overall high levels of emotional well-being. I imagine that by this point, some people may start wondering whether it might just be that people who have more positive attitudes, or encounter less adversity, live longer.

It is true that people with satisfying relationships and positive emotions live longer. Researchers have looked at what could explain this, and they find that psychological well-being is consistently related to lower levels of the stress hormone cortisol and better cardiovascular health. Other researchers have modeled that, and they still see an age-related advantage.

So emotion regulation improves with age; we see this again and again. These are small effects, but they are consistent. We see improvement for the majority of people, but not for everyone. I don’t know the percentages, but let’s say you have 40 percent remaining stable, 40 percent going up and 20 percent going down, you’ll see people still going up on average.

What might explain why some people do not experience these improvements?

Most of the people who have been included in these studies are what researchers define as WEIRD — people from Western, educated, industrialized, rich and democratic societies. We also know that not only are they from WEIRD societies, they often represent people from the dominant, white culture. This demographic profile means that a lot of people had financial security, they had pensions, there were social systems in place, and often the people we would interview were middle-class white people who were employed, who had a higher level of education. Compared to younger people of comparable socioeconomic status, the older people looked a lot better. But if older people are in very vulnerable situations, without stable housing, faced with constant stressors, or if they are living in pain, you may not see these benefits.

Stable housing is a common concern for young people too. Are these the kinds of things that weigh on their minds?

I think what’s really important for emotional well-being is to know that your future is secure, to achieve the luxury of not worrying about your future. When you’re younger, there’s a lot to worry about. I sometimes tell my undergrads: When older people say, “This is the best time of your life, enjoy it while you can,” that’s a form of abuse. A lot of younger people have high rates of distress.

My former mentor Laura Carstensen’s “socioemotional selectivity theory” talks about how everyone has a sense of how much time we have left in our lives. Younger people who are healthy and expect to have a long life ahead of them put in the hard work, and they value gathering information and planning for the future. As you get older, you see that there is less and less time left, and people start valuing emotional goals more. Older people will also rather spend time with family and friends than meet brand new people who might be interesting.

A recent study in Science found that like humans, older chimpanzees tend to have fewer but more positive social interactions, and so the researchers conclude that this development does not necessarily depend on the realization that time is running out. Do you agree that the mechanism behind these changes may be more basic than we thought?

I do think that chimpanzees who have survived into old age have adopted healthy habits that promote survival. I don’t think chimpanzees realize life is getting shorter. My speculation is that a couple of things may be happening. Human adolescents are really stimulated by novelty. They like surging emotions, and they like to take risks. This may be true with chimpanzees as well, and it might help them experience new things, reproduce and achieve dominance and status. But it is tiring, so when you have an older body, it might be nice to stay with what is familiar and comfortable. Decreasing energy levels might equally play a role in humans. In addition, [Stanford researcher] Robert Sapolsky found that grooming behavior among older male wild baboons is related to less stress. Perhaps the chimpanzees who were more prosocial and focused on companions that engaged in grooming behavior reaped the benefit of this social support.

But of course, we also have these incredible brains that allow us to put things in perspective.

Like people, older chimps also have more positive social interactions than younger ones do, a 2020 study reported. (Photostock-Israel / Science Photo Library via Getty Images)

Your findings might certainly inspire people to pursue a more positive attitude. At the same time, if you’re someone who is getting older and is unhappy, it might not make you feel better to read this.

For people who are unhappy, it’s really important to look at how to structure your days to feel more fulfilled. I guess for everyone I would say: When you’re making a list of health behaviors, getting enough sleep and exercise and eating right are important factors that most people agree should be included, but social relationships is something that is as important as your cholesterol level, yet is often forgotten. Make sure that you spend time cultivating your social ties, treasuring and prioritizing your close friends and family members, at whatever age you are. Finding purpose and meaning in life is also vitally important. What that is can be different for different people, but finding an important purpose and following that can be very emotionally gratifying.

Does that imply there might also be a risk of becoming too emotionally comfortable?

Yes. You can be so comfortable that you no longer encounter any challenges, and you really need to stay engaged in cognitive challenges. In a recently published study, we followed people over eight days. Every night, they were interviewed, and we’d ask about stressors. Did they get into an argument? Was there a situation where they could have argued, but decided not to? Are there any problems at home or at work?

We asked over 2,500 people about the relatively minor stressors they had experienced, such as a problem at work or an argument, every night over eight days. About 10 percent of the people reported never having experienced even one stressor. They also reported being happier than those who reported at least one stressor. But what we also found was that they performed worse on cognitive tests compared to people who reported at least one stressor. They also reported having received or given less help to others, and that they had spent more time watching TV.

Twenty years ago, we thought that if you have positive relationships and a certain lifestyle, you can have the highest emotional functioning, the highest cognitive functioning, the best physical health, the perfect life for you. Now it turns out to be a little more complicated. People who are reporting being happiest are also not as high in cognitive functioning.

This may be because people who have no stressors are spending less time with other people. The people you know and love are also sometimes the source of your stress. But they also challenge you and engage you in problem-solving activities. So it’s not that you can find optimal well-being in all areas; there might be a tradeoff. It’s like: “I want to be a volunteer, it gives me emotional meaning, I have a lot of purpose in life, but I’m also going to run into some people that may bother me.”

So people should strive for some kind of balance? How would you suggest they achieve it?

People definitely should strive for balance, but no one size will fit all. For example, we know that people benefit from having strong social ties, but people vary in the number of close friends and time they spend with others. We know that people need to stay physically active, yet some people prefer swimming and others jogging. We know that activities that are challenging for some people are boring for others.

To achieve balance, people need to know themselves, and make decisions that create dynamic lives where they are socially active and engaged in a way that makes them feel a sense of belonging and makes them feel needed. They need activities that are challenging for them, where they learn new information and have to remember this information — but this could be learning a new musical instrument or learning the layout of a new park or even an alternative world in a video game. They need to engage in physical activity that maintains or even enhances their physical health and functioning.

They need to think about their daily lives and how to live so that they engage in behaviors that optimize their physical health, cognitive functioning and emotional well-being.

Might there be a way for young people to press the fast-forward button to achieve some of the same emotional benefits older people acquire with age, or should they just be patient?

In the past 10 years, people have been talking more about mindfulness as an emotional regulation strategy. That is interesting, because it takes you away from focusing on the future and reminds you that the present moment is the most important. I think those are things that older people often do, but younger people may need to be reminded of. It can really help to have a moment at the end of the week to say, “Right now, things are going well — let’s just enjoy that for today.” It would be wonderful if that was something the youth could learn from older people.

I think as I grow older, I really understand it more profoundly. I always get a kick out of experiencing what the research shows.


Knowable Magazine is an independent journalistic endeavor from Annual Reviews.

Adblock test (Why?)

Read the whole story
506 days ago
Share this story
Next Page of Stories