小众开发者 #Swift #Themes  Docker  Github
< Code is code />
  • 免密码用 sudo 执行命令

    Apr 06, 2022

    默认情况下,使用 sudo 执行命令的时候需要输入当前用户的密码。 如果希望免输入密码执行,可以这样配置: 在 sudoers.d/ 目录下新建一个文件,名称无所谓,内容如下: 对于用户组 admin 免密码: …

    macOSLinux

  • Ubuntu 安装最小的 Gnome 桌面环境

    Mar 31, 2022

    如果直接安装官方的 Desktop 镜像,虽然得到开箱即用的最佳体验,但是也安装了一些不必要的应用。 在 Server 镜像上安装桌面环境,可以得到一个最纯粹的桌面系统。 TL;DR sudo apt-get --no-install-recommends install \ ubuntu-gnome-desktop network-manager yaru-theme-gtk gnome-tweaks epiphany-browser \ fonts-noto fonts-noto-mono fonts-noto-cjk fonts-noto-color-emoji 安装最小化的桌面环境 安装 Server 版本的系统: Ubuntu Server 安装桌面环境: sudo apt-get --no-install-recommends install ubuntu-gnome-desktop 安装网络管理工具,用于在系统里配置网络代理、宽带拨号设置等,浏览器使用的是网络配置里的代理信息: sudo apt-get --no-install-recommends install network-manager 安装 Google Noto 字体,包含了 CJK 字体,避免汉字显示为豆腐块: sudo apt-get --no-install-recommends install \ fonts-noto fonts-noto-mono fonts-noto-cjk fonts-noto-color-emoji 安装系统深色主题,因为最小化桌面环境只有浅色主题: sudo apt-get --no-install-recommends install yaru-theme-gtk 安装 Gnome Teaks 工具,可以很方便的配置系统: sudo apt-get install gnome-tweaks 安装 Gnome 浏览器: sudo apt-get --no-install-recommends install epiphany-browser

    UbuntuGnome

  • 可以替代 OracleJDK 的 OpenJDK 版本

    Mar 30, 2022

    OracleJDK 开发、测试是免费的,但是运行在生产环境下是需要付费授权。 OpenJDK 不仅开源而且完全免费使用。 Azul Zulu Builds of OpenJDK https://www.azul.com/downloads/?package=jdk#download-openjdk Liberica JDK https://bell-sw.com/pages/downloads/ Adoptium (AdoptOpenJDK) https://adoptium.net/temurin/releases Red Hat build of OpenJDK https://developers.redhat.com/products/openjdk/download

    JDK

  • 安装 DEB 安装包并自动安装依赖

    Mar 26, 2022

    有时候会遇到软件厂商或者作用只提供了 deb 格式的软件安装包,但还需要额外是依赖库才能正常运行。 直接使用命令 dpkg -i *.deb ,是不能处理 deb 里定义的依赖关系的。 正确做法是使用 apt 安装 deb 文件: …

    DebianUbuntu

  • 建立私有软件的 apt 仓库

    Mar 24, 2022

    使用私有软件源可以很方便的安装自己开发或者编译的软件。 第三方软件源的存放在 /etc/apt/sources.list.d 目录: 创建一个软件源文件: /etc/apt/sources.list.d/swift-toolchain.list 软件源文件的内容如下: deb http://127.0.0.1/repo swift-toolchain main 以上几部分拆开来解析: …

    aptDebianUbuntu

  • ssh 客户端通过代理连接服务器

    Mar 22, 2022

    ssh 客户端的代理功能需要通过 nc 转发来实现。 方法一:编辑 ~/.ssh/config ,添加以下内容: Host * ProxyCommand nc -X 5 -x 127.0.0.1:7890 %h %p 方法二:在命令中使用参数指定代理: ssh -o "ProxyCommand nc -X 5 -x 127.0.0.1:7890 %h %p" user@server nc 和代理有关命令参数: …

    ssh

  • Swift 5 静态编译

    Nov 17, 2021

    Swift 是支持静态链接的,因为它是跨平台的语言。参考这里:Static linking on Linux 静态链接的好处就是不需要带 Swift 的一堆 Runtime 库,在 build 的时候增加 -static-stdlib 就可以了。 但是如果在最新的版本(Swift 5.5.1)上静态编译,会得到一个错误信息: …

    Swift

  • SwiftUI 入门指南

    Sep 29, 2021

    Introducing SwiftUI SwiftUI is a modern way to declare user interfaces for any Apple platform. Create beautiful, dynamic apps faster than ever before. SwiftUI Essentials Learn how to use SwiftUI to compose rich views out of simple ones, set up data flow, and build the navigation while watching it unfold in Xcode’s preview. Creating and Combining Views Create a new Xcode project that uses SwiftUI. Explore the canvas, previews, and the SwiftUI template code. …

    SwiftSwiftUI

  • 使用命令行工具测试 APNs

    Sep 29, 2021

    APNs 全称是 Apple Push Notification service (苹果推送通知服务)。 早期的 APNs 是使用证书的方式,缺点是有时效性,需要定期更换。 到了 iOS10 时期,苹果推出了新的认证方式:密钥标识符。 密钥标识符没有时效,可以永久使用,每个密钥标识符对应一个密钥文件,如果密钥文件泄露,可以注销密钥标识符使其失效。 …

    macOS

  • port 安装支持 HTTP/2 的 curl

    Sep 29, 2021

    安装步骤 macports 默认情况下安装 curl: $ sudo port install curl 以上命令安装的 curl 不支持 HTTP/2 协议。 启用HTTP/2支持 需要添加变量 +http2,完整安装命令: $ sudo port install curl +http2 参考资料 https://trac.macports.org/ticket/44380

    macOS

  • 16
  • 17
  • 18
  • 19
  • 20

©2021 lvvme.

Powered by Hugo & Notepadium ipv6 ready