Let us see how to change the color of shell prompt on a Linux or Unix system when using bash.
Source: BASH Shell Change The Color of Shell Prompt on Linux or UNIX – nixCraft
Let us see how to change the color of shell prompt on a Linux or Unix system when using bash.
Source: BASH Shell Change The Color of Shell Prompt on Linux or UNIX – nixCraft
To change your directory colors, open up your ~/.bashrc file with your editor
nano ~/.bashrc and make the following entry at the end of the file:
LS_COLORS=$LS_COLORS:’di=0;35:’ ; export LS_COLORS
Source: How do I change the color for directories with ls in the console? – Ask Ubuntu
To change the port of the SSH server, the systemd configuration for ssh.socket must be changed or supplemented. The configuration adjustment is made by creating a *.conf file in the directory /etc/systemd/system/ssh.socket.d/ (if the directory does not exist, create it with the root user).
Source: How to change the SSH server port on Ubuntu? – Server Fault
JFC!
Needed to configure ssh to listen on a different port on a new Ubuntu server 24.04. Have done this many times before editing ssh_config. But this time nothing happened. The server wasn’t accepting the change. Googled and googled all night until I found out that systemd took over the god damned opening of ports away from openssh config.
I have other Ubuntu 24.04 installations that don’t do this so this is new and finding this new systemd fuck up hasn’t propagated the search engines. 14 year old answers don’t cut it anymore.
Still pissed off even though this site fixed the problem. Systemd needs to show warnings when they make changes like this, when they know a user wants to open up a port.
Had to get this off my chest.
Dear Lifehacker, I have some background in coding, but I’ve never touched Android development before. I’d like to get started, but I’m not entirely sure what I need. I don’t need to “learn to code” per se, but I could use some guidance on where to start with Android. Can you help?
This is CS50x, Harvard University’s introduction to the intellectual enterprises of computer science and the art of programming for majors and non-majors alike, with or without prior programming experience. An entry-level course taught by David J. Malan, CS50x teaches students how to think algorithmically and solve problems efficiently. Topics include abstraction, algorithms, data structures, encapsulation, resource management, security, software engineering, and web development. Languages include C, Python
Source: Introduction to Computer Science
There are various ways to use parallel processing in UNIX
C++ includes useful generic functions like
std::for_each
andstd::transform
, which can be very handy. Unfortunately they can also be quite cumbersome to use, particularly if the functor you would like to apply is unique to the particular function.
Source: What is a lambda expression in C++11?
C++11 introduces lambdas allow you to write an inline, anonymous functor to replace the
struct f
. For small simple examples this can be cleaner to read (it keeps everything in one place) and potentially simpler to maintain,
Hashlimit is an iptables module that allows one to define rules that in effect will limit traffic speed (bytes / time unit) or frequency (connections / time unit) per target or origin ports / IPs. The inner workings of this module and / or how to make it work correctly remains a mystery for many.
Hashlimit is also close friends with the limit module, only much more powerful, capable of expressing rate limiting per source IP (for example) in a single rule.
Source: Stuff I do: How does iptables hashlimit module work?
The loop abstractions examined here are just one type of parallel or concurrent programming abstraction available. There is a whole universe out there, Actor Models, Async/Await, Tasks, Thread Pools, and so on. Be sure to understand what you are using, and measure whether it will really be useful, or whether you should focus on fast single threaded algorithms or look for third party tools with better performance.
Source: Think Before You Parallelize
Here I’d like to explain some common security problems found in large corporations during pentesting by giving an example.
Source: How I Hacked Facebook, and Found Someone’s Backdoor Script | DEVCORE 戴夫寇爾
A brief summary, the hacker created a proxy on the credential page to log the credentials of Facebook employees. These logged passwords were stored under web directory for the hacker to use WGET every once in a while