Skip to content

Instantly share code, notes, and snippets.

View moskva's full-sized avatar

Steven Suen moskva

View GitHub Profile
@ttscoff
ttscoff / autooptim.rb
Last active December 26, 2020 16:47
Script intended for use with Hazel to resize/optimize web images based on directives in image filenames
#!/usr/bin/ruby
# Brett Terpstra <http://brettterpstra.com>
=begin
Example:
> file1@2x%%ohc.png
=> Converts png to jpeg, creates 1x and 2x versions, optimizes both with jpegoptim
Available directives:
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)