大概是一个技术博客

Probably a technical blog

本文所在环境为 MacOS

事先准备好各个尺寸的png图标图片,放入将要操作的目录

生成ico图标(windows 与 linux 用)

安装 icoutils

1
$ brew install icoutils

执行命令生成ico图标

1
2
3
4
5
6
7
8
# 指定模式
$ icotool -c icon32.png -o icon32.ico
$ icotool -c icon256.png -o icon256.ico
$ icotool -c icon16.png icon32.png icon64.png icon128.png icon256.png icon512.png -o icon.ico

# 批量模式
$ mkdir icons.iconset # 创建一个临时目录存放不同大小的图片
$ icotool -c ./icons.iconset/*.png -o icon.ico

生成icns图标(MacOS 用)

准备一个 1024 x 1024 的 png 图片

执行以下命令行,创建一个临时目录存放不同大小的图片

1
$ mkdir icons.iconset

把原图片转为不同大小的图片(放入上面的临时目录)

1
2
3
4
5
6
7
8
9
10
sips -z 16 16     icon1024.png --out icons.iconset/icon_16x16.png
sips -z 32 32 icon1024.png --out icons.iconset/icon_16x16@2x.png
sips -z 32 32 icon1024.png --out icons.iconset/icon_32x32.png
sips -z 64 64 icon1024.png --out icons.iconset/icon_32x32@2x.png
sips -z 128 128 icon1024.png --out icons.iconset/icon_128x128.png
sips -z 256 256 icon1024.png --out icons.iconset/icon_128x128@2x.png
sips -z 256 256 icon1024.png --out icons.iconset/icon_256x256.png
sips -z 512 512 icon1024.png --out icons.iconset/icon_256x256@2x.png
sips -z 512 512 icon1024.png --out icons.iconset/icon_512x512.png
sips -z 1024 1024 icon1024.png --out icons.iconset/icon_512x512@2x.png

执行命令生成icns图标

1
$ iconutil -c icns icons.iconset -o icon.icns

Github仓库地址:https://github.com/cycjimmy/awesome-swiper


libraries dependency statuslibraries sourcerankRelease daterollupsemantic-releasenpm license

English | 中文


安装

NPM versionNPM bundle sizenpm download

1
2
3
4
5
# via npm
$ npm install @cycjimmy/awesome-swiper --save

# or via yarn
$ yarn add @cycjimmy/awesome-swiper
阅读全文 »

说明: http或socks5代理自备

配置代理

1
2
3
4
5
# http代理
$ git config --global http.https://github.com.proxy http://127.0.0.1:1080

# socks5代理
$ git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

取消代理(还原)

1
$ git config --global --unset http.https://github.com.proxy

本文所在环境为 macOS, 其他平台类似

使用

  • 安装 polipo (请确保系统安装了 brew)

    1
    $ brew install polipo
  • 运行 polipo, 设置上级 socks 代理的端口号.

    1
    2
    3
    4
    5
    6
    7
    # 我的 socks 代理的端口号是 5555, 您需要把它改成您自己的
    $ polipo socksParentProxy=127.0.0.1:5555

    # 看到下面的提示说明启动成功了,
    # polipo 默认在 8123 端口启动了 http 代理,
    # 您现在可以使用 8123 端口进行网络配置了.
    Established listening socket on port 8123.
阅读全文 »