Categories
Mac OS

/usr/libexec/lsd occupied 100% CPU solution

Suddenly discovered a large number of writes on the disk recently,Open the task manager,Found a process called "lsd" continues to occupy 20% – 40% CPU,Very strange。

After some inquiries,Learned that this process is a system process on macOS and iOS,Full name is "Launch Service Daemon",Responsible for all App file type association and startup。But its database is sometimes damaged,This causes it to frequently read and verify certain data。

Once its database is damaged,You will encounter lsd[……]

Click link to continue reading...

Categories
Mac OS

Use xcode-install to manage Xcode versions

we all know,There is pyenv when using Python,If you use ruby, there is rbenv,Can easily control and manage the version of the programming language environment,Then,Is there any way,Can Xcode switch versions like this?

Every time Xcode releases an update,More or not has become a problem,Difficult to download,Can't resume,Can't use third-party tools to download,It's really terrible... not to mention the compatibility issue when multiple versions。

use xcode-install,One time[……]

Click link to continue reading...

Categories
Python

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9

Normal,You will encounter this error when installing a Python package,This package must be a package containing C ++ code。

This is due to incompatibility after macOS update,In General,The maintainer of this package should already be compatible with this particular situation:

So that it can be successfully compiled on macOS。

But if you are using PyPy,Maybe even if the maintainer includes this sentence,You can't succeed[……]

Click link to continue reading...

Categories
Python

Python detects its own memory footprint in real time

Recently doing text statistics,Implemented in Python,Encountered an interesting problem-how to save statistical results。

Writing directly into memory is really impossible,Memory exhausted after ten hours,The program was forced to close。If you write directly to the database,Each write is too slow,It's been more than ten hours,If you go on like this, you will have to count on the week,Not a solution。

At last,I thought of a solution that combines both-using memory as a buffer,After reaching a certain amount, all the current data will be merged into the hard disk at one time。

But then there is a threshold,How to confirm[……]

Click link to continue reading...

Categories
Mac OS

Safari 13 Remove Google search results jump

In Safari 9 before,We just download a safariextz file and double click on it,So that Safari can load this plugin。The benefit is definitely very convenient,But it ’s also not very secure (plugins that can be downloaded everywhere,It is likely to have been tampered with)。

So later,Apple no longer allows users to directly download plug-ins to install on Safari,App must be downloaded from Mac Apple Store,Then the Safari plugin is provided in the form of a plugin in the app,With App[……]

Click link to continue reading...

Categories
Wordpress The internet

Avoid WordPress being used as a reflection amplification attack

Before I wrote an article,Use fail2ban Bind9 be used to prevent DNS amplification attacks,Never imagined,original Wordpress It can also be used for amplification attacks,The principle is its Pingback mechanism。

Pingback is a tool for notifying each other of a Wordpress website,For example, A blog refers to a link to a B blog post,Then Wordpress can automatically help you inform B blog,Tell the blogger that you quoted his article。

This[……]

Click link to continue reading...

Categories
Swift

iOS correctly set the status bar style color

When developing iOS apps,Many applications need to set the color of the iOS system status bar according to the current App content color,Black or white-especially on iOS 13 After the system supports the black mode。

Normal,Others will tell you to do this:

But this triggers a warning: Deprecated in iOS 9 。So is there any other way? Have,The official recommendation is[……]

Click link to continue reading...

Categories
The internet

When Mailgun no longer free,How do you placed your domain mail?

Before I wrote an article:《 Use Mailgun create your free domain mailMailgun There is a very interesting feature is the recipient routing,With this feature set,You can use any incoming mail forwarding to your mailbox which set a good,This eliminates the need for each domain name to set up a mail service,Only through Mailgun On the corresponding e-mail can be forwarded by e-mail needs - after all,,Usually we will use these domain mail may be a basic authentication。

Recently,Mailgun no longer free,Free users[……]

Click link to continue reading...

Categories
Python Swift

Swift Python Json data exchange signature

It has been a very popular self-signed certificate for HTTPS decryption,Then there are a lot of people realize crack of App by modifying Apple's internal purchase receipt。In fact Verified Purchase should be connected to the server App,Server to communicate with Apple's servers,The results are then sent to the App - but a lot of developers (including individual developers and corporate developers) do not bother to go to a special server maintenance,So communicate directly with the App and Apple's servers,This provides an opportunity for middle attacks。

Middle attack,It means when A and B communicate[……]

Click link to continue reading...