Daily Shaarli

All links of one day in a single page.

May 2, 2023

How to Exclude Files and Directories with Rsync

To exclude multiple files or directories simply specify multiple --exclude options:
rsync -a --exclude 'file1.txt' --exclude 'dir1/*' --exclude 'dir2' src_directory/ dst_directory/

If you prefer to use a single --exclude option you can list the files and directories you want to exclude in curly braces {} separated by a comma as shown below:
rsync -a --exclude={'file1.txt','dir1/*','dir2'} src_directory/ dst_directory/

If the number of the files and/or directories you want to exclude is large, instead of using multiple --exclude options you can specify the files and directories you want to exclude in a file and pass the file to the --exclude-from option.

NJ factory imports cocaine plant for Coca-Cola due to DEA arrangement
thumbnail

Guess you really can’t beat the real thing.

Coca-Cola gets its iconic taste thanks in part to a chemical processing factory in a sleepy New Jersey neighborhood that has the country’s only license to import the plant used to make cocaine. //

The Maywood-based facility, now managed by the Stepan Company, has been processing coca leaves for the soft-drink giant for more than a century and had its license to import them renewed by the Drug Enforcement Agency earlier this year.

The coca leaves are used to create a “decocainized” ingredient for the soda and the leftover byproduct is sold to the opioid manufacturing company Mallinckrodt, which uses the powder to make a numbing agent for dentists, DailyMail reported. //

Importing coca leaves was banned in 1921, but the legislation left an exemption for Maywood Chemical Works, which ran the factory before Stepan Company bought the site in 1959.

Circe Invidiosa 1892
thumbnail

Circe Invidiosa 1892

Date: 1892
Medium: Oil on canvas
Size: 180.7 x 87.4 cm
Location: Art Gallery of South Australia, Adelaide, South Australia, Australia

The painting Circe Invidiosa by John William Waterhouse is an intriguing work that explores the character’s ancestry, her reflection and the relationship between her ancestor. It is a classic example of a work of art that transcends time. Waterhouse’s interpretation of Circe reveals the depth of the story’s emotional themes. This work shows how the dark side of human nature is brought to light and how women find their identity and purpose in the universe.

Tesla’s magnet mystery shows Elon Musk is willing to compromise | Ars Technica
thumbnail

Ever since the early 1990s, when China’s leader, Deng Xiaoping, declared the metals to be his country’s equivalent to Saudi oil, they’ve been a kind of buzzword for trans-Pacific geopolitical anxieties. Never mind that rare earths are nothing like oil—the total market is worth about the same as the US egg market, and the elements can theoretically be mined, processed, and turned into magnets all over the world. But China is the only place that does all of it.

China’s near-monopoly is partly due to economics—in the 1990s, cheap Chinese rare earths flooded the market, hastening the shutdown of mines and processing in places like the US—and partly due to environmental concerns. Mining and refining rare earths is a notoriously toxic business, in part because the most valuable elements, like that magnet-boosting neodymium, come tightly bound with other rare earths, as well as radioactive elements like uranium and thorium. Today, China produces nearly two-thirds of rare earths mined worldwide and processes more than 90 percent of the world’s magnets.

“You have a $10 billion industry, which enables products that are worth between $2 trillion and 3 trillion a year. It’s enormous leverage,” says Thomas Kruemmer, a minerals analyst and author of the popular Rare Earth Observer blog. //

Currently, 12 percent of rare earths go into EVs, according to Adamas Intelligence, a market that’s just now taking off. At the same time, rare earth prices have recently whiplashed due to internal Chinese markets and political interventions that outside companies cannot always predict.

All in all, if you’re in a business where you can make an alternative work, it probably makes sense to do so, says Jim Chelikowsky, a physicist who studies magnetic materials at the University of Texas, Austin. But there are all kinds of reasons, he says, to look for better alternatives to rare earth magnets than ferrite. The challenge is finding materials with three essential qualities: They need to be magnetic, to hold that magnetism in the presence of other magnetic fields, and to tolerate high temperatures. Hot magnets cease to be magnets.

How to disable iptables firewall temporarily - Kernel Talks
thumbnail
 iptables-save > /root/firewall_rules.backup

For older Linux kernels you have an option of stopping service iptables with service iptables stop but if you are on the new kernel, you just need to wipe out all the policies and allow all traffic through the firewall. This is as good as you are stopping the firewall.

Use below list of commands to do that.
iptables -F
iptables -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

Where –

-F: Flush all policy chains
-X: Delete user-defined chains
-P INPUT/OUTPUT/FORWARD: Accept specified traffic

Once done, check current firewall policies. It should look like below which means everything is accepted (as good as your firewall is disabled/stopped)
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

 Chain FORWARD (policy ACCEPT)
 target     prot opt source               destination

 Chain OUTPUT (policy ACCEPT)
 target     prot opt source               destination
The Difference Between 18-8 vs 304 vs 316
thumbnail

Many people mistakenly believe that all stainless steel is the same. This is not true. The type and grade of stainless steel fasteners that you invest in will determine just how corrosion resistant they are and, of course, how durable and long-lasting you can expect them to be. Whether you are buying nuts, bolts, nails and screws, rivets and pins or anchoring systems, you must take the environment into consideration.

Professionals must know what the difference is between 18-8 vs. 304 vs. 316-grade stainless steel. We’re going to help simplify it for you. Here’s what you need to know about each of these three different grades: ///

18-8 and type 304 are the same alloy

New York's income sinks nearly $16B compared to pre-COVID as residents flee
thumbnail

New York’s pandemic-induced exodus is killing the state’s bottom line.

The Empire State’s pool of adjusted gross income shrank by nearly $16 billion in 2021 compared to just two years ago — representing a major loss in potential tax revenue compared to pre-COVID levels, according to newly released data from the Internal Revenue Service cited by the Wall Street Journal. //

Much of that has wound up in Florida, which has seen a $10 billion windfall in 2021 stemming from newly arrived New York transplants, according to the data.

Those scary warnings of juice jacking in airports and hotels? They’re mostly nonsense | Ars Technica
thumbnail

An FBI spokesperson told me this month’s tweet was “a standard PSA-type post—nothing new” and that it stemmed from the FCC warning. “This was a general reminder for the American public to stay safe and diligent, especially while traveling.” They added: “I am sorry I can’t give you an answer that is more newsy.” When I asked an FCC spokesperson what the basis was for the agency to update its warning five days later, they said it was prompted by the Denver FBI tweet.

What this means is that state and federal authorities and hundreds of news outlets—none of them with any expertise in cybersecurity—have generated a continuous feedback loop. This vicious cycle has done little more than scare the public into eschewing charging stations when there’s wide consensus among security professionals that there’s no reason for anyone other than high-asset targets of nation-states to do so. //

Finally, besides there being no universal script that will work on hundreds or even dozens of different devices, the customized scripts are non-trivial to write. They require a high skill level and a huge amount of trial-and-error troubleshooting.

None of this is to say that people shouldn’t bring their own charging cord and wall plug when they’re out of the home or office. That is a best practice, but it's wrong to characterize it as a required practice. //

The problem with the warnings coming out of the FCC and FBI is that they divert attention away from bigger security threats, such as weak passwords and the failure to install security updates. They create unneeded anxiety and inconvenience that run the risk of people simply giving up trying to be secure.

As security researcher Kenn White recently wrote of the warnings on Mastodon: “What's the end goal here? Convince people who are down to 2 percent battery while traveling to never use modern public infrastructure? Come on. There are 20 things that threaten muggle endpoint security, and this isn't among them.”