CaveOps: Night-City
#Hello Edgerunners, welcome to the Night-City.

Welcome!

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...

Xcode: Showing TODO as a warnig in a Swift Xcode project

I rarely use comments when I’m coding1. I do make one exception though; using // TODO: and // FIXME: to highlight pieces of code I need to revisit at a later date. The advantage of doing this is that the lines then show up in the jump bar popover in bold text with one-click access to the exact line....

最近一些比较好的 jQuery 插件

最近一些比较好的 jQuery 插件。 Gradientify 是一个简单的 jQuery 插件,它提供了 CSS 梯度过渡效果。 PrognRoll 是一个微小的 jQuery 插件,用于在页面上创建滚动进度条。 您还可以自定义进度条。 jqGifPreview 是一个 jQuery 插件用来创建 GIF 预览就像 Facebook 和微博。 这个插件使用第一帧的 GIF 图像作为预览图像。 Shave 是一个零依赖 JavaScript 插件,它截断多行文本以适合根据 max-height 定好的 html 元素内。 Philte r是一个 jQuery 插件让你能够利用 H...

OS X: Setting up Spotlight Control in OS X El Capitan to macOS Sierra

OS X El Capitan introduced a new Security Feature called System Integrity Protection. With System Integrity Protection Bartender 2 needs additional setup steps performed before it can control Spotlight. Bartender 2 can control all other Apple menu items without these additional steps. Unfortunately ...

Why SVG?

SVG是什么? SVG是一种可缩放矢量图形 (英语: Scalable Vector Graphics, SVG) 是基于可扩展标记语言 (XML) , 用于描述二维矢量图形的图形格式。SVG由W3C制定, 是一个开放标准。 简单的理解, 它是图形的另一种格式例如它和常见的图片格式.png、.jpg、.gif等是一类。 SVG发展历程 2001年9月4日, 发布SVG 1.0 2003年1月4日, 发布SVG 1.1 2003年1月14日, 推出SVG移动子版本: SVG Tiny和SVG Basic 2008年12月22日, 發布SVG Tiny 1.2 2011年8月16日, 發布SVG...

iOS: in6_addr to string

将 struct in6_addr 转换为字符串: + (NSString *)formatIPV6Address:(struct in6_addr)ipv6Addr { NSString *address = nil; char dstStr[INET6_ADDRSTRLEN]; char srcStr[INET6_ADDRSTRLEN]; memcpy(srcStr, &ipv6Addr, sizeof(struct in6_addr)); if (inet_ntop(AF_INET6, srcStr, dstStr, INET6_AD...

What's this?

The Night-City version of CaveOps 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.

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

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

热爱苹果、钟情色彩。

随时恭候 垂询