UTI quick check of a file

When carrying out the development of iOS macOS,We often need to interact and file,For example, association and open a certain type of file,Well, this time,Your name suffix used in this document are not,But it's UTI。

UTI is a unified file type name,It sets out what should be a file type,Rather than suffixes to determine,For example, txt,text,json are plain text files,They are public.text

Then,usually,For the well-known file types,You can go toApple's official page[……]

Click link to continue reading...

Chsh -s mismatch with how to shell the rescue?

With the wrong default environment is not terrible,Well matched back like a big deal。

Obviously,He says such things there is no story。

In short,If you find that your vps One day suddenly can not log in,The content is not being given no authority,But the certificate is to determine the right - then you might be wrong with the last exit before the shell。At this time, even if you use the console to log on,After logging will find immediately flashed back to the login screen - finished,You thought,Just with a good environment, we have to do it all again。

use chsh Silent switch[……]

Click link to continue reading...

Fail2Ban protection of Nginx Advanced Configuration Services

existAfter purchasing a VPS you should spare security measuresAs we mentioned with fail2ban To protect ssh ,So even without changingsshPort (default is22),Also can be done to avoid brute force password,of course,We have opened the credentials to log in and closed the ssh password login option,But with fail2ban Kill those who keep trying to make us feel bot is also a pleasant thing。

In fact,apart from Use fail2ban Bind9 be used to prevent DNS amplification attacksouter,We can also[……]

Click link to continue reading...

UserNotifications user-created using sound as a tone

Use custom sounds as notification sounds

In iOS 10 after,iOS uses a new UserNotifications As the notification API,This allows developers to use images、video、Sound and other rich media content as the notification,While further,You can also use the Notification Content Extension Size customize the content and layout of notice。
If you are self-defined tone notification,Then you can give [cray[……]

Click link to continue reading...

Item “xxx” is used by macOS and cannot be opened.

When restoring data,You may need to use U disk copy data,But macOS default is read-only mount ntfs,of course,We have a way to use the command line to become re-mount it read-write。But this is likely to cause ntfs permission error,The result is that when plugged into another computer's,This file mayGrayed

If you use this time to force it open decompression software,Then you will get a similar error:

Item “xxx” is used by macOS and canno[……]

Click link to continue reading...

Talk Shadowrocket and Quantumult

Since I replaced the United States District Apple ID,Originally purchased the Surge will not be used again - of course,Now Surge also updated the new version,to me,Spend millions to buy an advanced network debugging tools and then simply used over the wall,Think I felt very stupid。

Fortunately,macOS version of the Surge 2 Authorization is still,After all, this does not follow Apple ID,I can continue to use。Surge future 2 Stop updating of the maintenance,I would consider continue to adhere to a few years to buy new。

In short,In iOS[……]

Click link to continue reading...

How pocketed input method macOS is how to handle ascii 0x01 compatibility issues -macOS input settings correct buffer

As early as last year,Off the grid user input methods have reported pocketed Chinese input method macOS can not type in normal mode MarkDown proper way cloud notes,After testing proved true,Embodied in the text when hit,buffer refresh will be strange delete a character before the cursor - on,no more, no less,To delete a。

Fiddle for a long time failed,Finally, I did not move all the contents out of print,Discover the mystery:

When I get input cursor to the left of the text printed out,I found behind the text is appended a strange character[……]

Click link to continue reading...

Pocketed input method is how to share anti-piracy accounts on iOS

For iOS developers,The face of app piracy,The biggest problem is not a technical break,Instead, more and more sharing of pirated Apple ID,Some people might say that piracy is equivalent to a "trial" of the,Like people will naturally go into positive ...... but in fact,Because of penny share account of piracy,Led to numerous independent developers and ultimately to the vote resume。

In short,last year,Surge authors published such an article Surge 2.0 It is how to achieve the anti-piracy on iOS His theory was purchased from the app[……]

Click link to continue reading...

In NSView 10.12 Detailed problem does not show shadow

On iOS,If we want to display a shadow View,So basically do:

but,To the macOS,This would not work - no effect。

The answer lies in the macOS a View If you want to use layer ,You must manually mark,For example, this:
[crayon-69062[……]

Click link to continue reading...

Road Less Traveled:How independent developers that find resources

In fact, two months ago, this one should be written,However, there are some things to delay so they now。A few days ago to discuss the concept and friend to the independent development of the "small minority" of,I feel the need to further detailed definition of what。What independent developers do this minority is,The so-called market segmentation,Exactly how should subdivision。

Mind niche

When it comes to niche segments and,It may be the first impression a lot of people are those things nobody cares about, such as a handful of students in a small school needs,In some lawyer or needs work ...... Here we recallMarket segments:How independent developers that determine the development projectin[……]

Click link to continue reading...

letsencrypt tool renamed certbot

Today Gerber drop-off certificate expired,I have written beforeHow to add https support with letsencrypt to blog,And teach you to write a regular update service at the end of the article,So you do not own every three months to update the manual。

but,If your certificate to expire,So in fact letsencrypt robot will send you a reminder email,The general content like this:

Hello,

Your certificate (or certificates) for t[……]

Click link to continue reading...

ANNE pro GH60 customize the keyboard keys set macOS

Before I wrotePoker 2 Mechanical keyboard Mac key to modifyArticles,Because now I bought a lift tables,Then poker wired,So very convenient,Just wondering to buy a Bluetooth keyboard,I did not expect that year dream of mechanical Bluetooth keyboard has been ready,Just,He wondered if he ordered a。

I have a soft spot for wasd key direction of poker,Especially after the change is fn capslock,Simply programming tool,Cool batch,So this is bound to be looking for 60 key keyboard,Also support capslock + in[……]

Click link to continue reading...

macOS keyboard event intercepted three ways

Under normal circumstances,You do not need to know the contents。

In rare cases,Your app might need to get the user presses the button information,such asThe ones released Develop a Input Method。Only then can you provide candidates to the user。

How to create an input method under macOS,I'm hereSwift uses InputMethodKit to write an input methodThis article has detailed instructions,Pass it over here,How do we have focused on addressing key user,Especially the handling of a modified key。

Pocketed input method has always been a sort of a small[……]

Click link to continue reading...

winform using video as a window background

A recent project on Windows,Customer requirements to do the "flip" a little,so,Dynamic window background is always essential content (such as mobile phones qq login screen, right?

I thought this is a very easy to implement functionality so keen on the idea down ...... yes,In winform in,Not so easy to achieve the effect you want the。

Of course,We think that if you want to play video,Then the system comes with media player,Just add a control that can handle - the result is a video playback of either[……]

Click link to continue reading...

Csf firewall to effectively prevent the use of small-scale DDOS

Update:upgrade Ubuntu 20.04 LTS Rear,csf is not working,Prompt that iptables cannot be found:

This is because Ubuntu 20.04 LTS Changed iptables Related command position,The csf script is not updated in time。

To solve this problem,We can go to[cr[……]

Click link to continue reading...

Avoid input candidate article hidden behind other windows

When developing pocketed macOS version of the input method,I encountered such a problem,That is the window priority issues。Before How to make NSWindow displayed in a different Space or the Screen This article I referred to himself realizes candidate field pocketed input method,In fact, with a NSWindow Implementation。So since it is a common (through the magic change) of [crayon-69062bee443e300928[……]

Click link to continue reading...

Face coronasdk physics engine

Development on mobile phone,Currently popular on the network mainly two development software,Is a well-known unity (after all, the year 4399 above the game online edition of Minecraft developed by it,3d engine without any software beyond it),Another is the relatively small minority of the cocos。cocos occupy a major position 2d game,And unity has occupied a major position 3d game。And we are talking about the same as coronasdk and cocos 2d game engine (coronasdk not been known before 2010 mainly due to charges[……]

Click link to continue reading...

Development plate reader serial Android Andrews

Recently received a project,Demand is to do a special project Andrews board serial read and write in order to achieve some specific external devices to interact with - yes you read right,Andrews is also a board can have serial port!

Many friends do mobile development may not come into contact with - in fact, before I did not come into contact with。He stepped on seven or eight hours a pit,Finally climb out,Here to do a summary,Each board may project different circumstances,We must improvise。

First of all you need to know

Jumper,In order to save the project board USB interface,The default external USB interfaces are not connected to the computer debugging[……]

Click link to continue reading...

? Double,Non-stop fight。→ 落 格 输入 法 macOS 版,Official last!?

Excellent input method,We came another excellent platform!

Although it lacks many features,But I can not wait to share these good things to you,He pocketed finally embarked on the input method macOS,over the years,Enter Larry is a nightmare in macOS,Now,This nightmare can end up。

In addition to incomplete abandoned pit I do not know when it can not be used palms input method for Mac、An outer substantially non-professionals can not be input with the Rime,You have one more choice,Pocketed input macOS version

When the Ins and Outs of six months[……]

Click link to continue reading...