Skip to content

Instantly share code, notes, and snippets.

View chroming's full-sized avatar
I may be slow to respond.

chroming

I may be slow to respond.
View GitHub Profile
@chroming
chroming / docker_use_remote_daemon.md
Last active November 30, 2020 13:47
macOS docker使用远程daemon
@chroming
chroming / copy_file_from_iphone_in_macos.txt
Last active November 20, 2020 14:00
如何在macOS上直接拷贝iPhone照片
iphone用数据线连mac,在mac里找实用工具文件夹,在里面找图像捕捉,直接能看到所有照片,下面有选项,可以选取导入或者全部导入,或者直接选中拖到mac文件夹。
https://www.zhihu.com/question/268250646
@chroming
chroming / salt-call_without_master.md
Created November 12, 2020 12:27
salt-call不连接master独立使用

参考:SALT MASTERLESS QUICKSTART

临时方法:调用salt-call时加上--local参数

salt-call --local test.ping

长期方法:修改配置

vim /etc/salt/minion

@chroming
chroming / build_raspberry_3b_clash_in_macOS.sh
Created August 6, 2020 14:24
macOS交叉编译树莓派3B版clash
go get -u -v github.com/Dreamacro/clash
GOOS=linux GOARCH=arm GOARM=7 go build github.com/Dreamacro/clash
@chroming
chroming / salt_sync_all_after_modules_modified.sh
Created July 23, 2020 13:16
当salt modules文件更新后自动sync all
# yum install inotify-tools
#!/bin/sh
while inotifywait -e modify /srv/salt/_modules; do
salt '172.16.184.148' saltutil.sync_all
done
@chroming
chroming / ELK_with_caddy.md
Created July 2, 2020 16:38
ElasticSearch+Kibana with Caddy proxy

First you should set kibana.yaml:

server.basePath: "/kibana"

Don't change server.rewriteBasePath: false

Then change Caddyfile:

192.168.10.1:80
@chroming
chroming / libarchive_in_macos.txt
Created June 29, 2020 08:01
Build source with libarchive error in macOS
Cannot find source file:
... /libraries/cmake/source/libarchive/src/libarchive/archive_acl.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
libraries/cmake/source/libarchive/CMakeLists.txt:182 (libarchiveMain)
CMake Error at libraries/cmake/source/libarchive/CMakeLists.txt:136 (add_library):
@chroming
chroming / macOS_Big_Sur_bugs.md
Last active October 2, 2020 04:15
macOS Big Sur Beta轻度使用踩坑记录

本文记录使用Big Sur测试版遇到的坑及解决办法。

brew upgrade 失败

现象

brew upgrade下载完成安装包后,提示 MethodError: undefined method 'path' for nil:NilClass, Did you mean? paths

解决方法

参考: rbenv/ruby-build#1434 , 安装beta版Command Line Tools即可。

@chroming
chroming / change_shortcuts.txt
Created June 14, 2020 16:14
macOS修改Google Chrome关闭窗口快捷键
默认为command+shift+w,在系统偏好设置--键盘--快捷键--App快捷键--选择添加Google Chrome--关闭窗口 按下其他快捷键,默认快捷键就会失效。
@chroming
chroming / sudo_with_touch_id.md
Created May 18, 2020 16:43
macOS sudo支持TouchID