#Hello Edgerunners, welcome to the Night-City.

Welcome!

iOS: Get Alphanumeric System Version

This is the way to get the alphanumeric system version like 16E195 in 10.3(16E195). Objective-C Way #import <sys/sysctl.h> - (NSString *)alphanumericSystemVersion { int mib[2] = {CTL_KERN, KERN_OSVERSION}; u_int namelen = sizeof(mib) / sizeof(mib[0]); size_t bufferSize = 0; N...

Determining UTIs defined by App bundles

We know that lsregister -dump is an option; however, I'm left to wonder if there isn't a better solution. In my searching I've come across a private API that could be of use: __UTCopyDeclaredTypeIdentifiers Since there's absolutely no documentation for it, I give you this: import Foundation @_silgen...

Filesystem Hierarchy Standard

Filesystem Hierarchy Standard Abbreviation FHS Status Published Year started 14 February 1994; 28 years ago Latest version...

iOS 10.3: Setup Alternate Icon

最近苹果发布了新的 iOS 正式版本 10.3, 有一个新特性引起了不少人的注意 —— 换图标。 看了看文档, 代码简单到只有一句话: [[UIApplication sharedApplication] setAlternateIconName:@"" completionHandler:^(NSError * _Nullable error) { }]; 当然, 在使用这句代码前, 还是需要改一下 Info.plist 文件, 格式为: <?xml version="1.0" encoding="UTF-8"?>...

hosts

Locations Windows 7/8/8.1/10: C:\Windows\System32\Drivers\etc\hosts macOS/iOS/Linux/Android: /etc/hosts hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## # Localhost (DO NOT REMOVE) 127.0.0.1 localhost :...

OS X: Problem with IntelliJ IDEA License Server on Sierra

Using sudo ./IntelliJIDEALicenseServer_darwin_amd64 on macOS 10.12+ will be some problems like Permission denied and Command not found. To solve this, you may need brew install upx and upx -d ./IntelliJIDEALicenseServer_darwin_amd64 first. And since sudo spctl --master-disable doen't work well in th...

How to hide the Spotlight icon from the Menu Bar

If you never use the Spotlight feature on your Mac, or if you only use it from the Finder rather than from the menu bar, you may have wondered how to get rid of its icon. Whilst most of the menu bar icons can be hidden with user-accessible toggles from System Preferences, Spotlight’s little magnifyi...

A Bite of Python

不可不知的Python陷阱 由于易于学习以及快速开发更大更复杂的应用, Python 渐渐在计算环境中无处不在。尽管明显的语言清晰度和友好会麻痹软件工程师和系统管理员的警觉性,诱使他们编码可能会有严重安全隐患的错误。 在这篇文章中,它主要针对 Python 新手,会看到少量安全相关的小技巧;有经验的开发者可能会注意到后面的特殊性。 输入函数 在 Python 2 大量的内置功能集合中,input 完全就是一个安全灾难。一旦调用它,从标准输入读入的任何东西都会被立即解析为 Python 代码: $ python2 >>> input() dir() ['__builti...

OS X: Best practical way to validate NSTouchBar items

Protocol and extensions: @available(macOS 10.12.1, *) protocol TouchBarItemValidations: class { func validateTouchBarItem(_ item: NSTouchBarItem) -> Bool } @available(macOS 10.12.1, *) extension NSTouchBarProvider { func validateTouchBarItems() { guard NSClassFromString(&quo...

系统基本配置概要

因为时不时会给自己或者被人的电脑💻重装系统, 装系统很简单, 但之后要配置的内容还是蛮多的, 这里列举一下吧。 重装系统 首先要从重装系统说起, 由于直接运行 .app 安装会保留原来的数据, 而很多时候这正是我们不希望看到的, 所以我们要用到 Terminal 来解决,详细内容可以参考我 之前的博客。 sudo createinstallmedia路径 --volume U盘路径 --applicationpath 安装器App路径 安装工具 rvm 接下来, 系统安装好之后先来安装 rvm 吧: \curl -sSL https://get.rvm.io | bash -s stabl...

What's this?

The Night-City version of Hotodogo inspired by Cyberpunk 2077. Not finished yet.

Pinned Message

The Founder and CEO of Infeca Technology.

Developer, Designer, Blogger.

Big fan of Apple, Love of colour.

Feel free to contact me.

反曲点科技创始人和首席执行官。

开发、设计与写作皆为所长。

热爱苹果、钟情色彩。

随时恭候 垂询

Outer Square Inner Square