服务 | 端口号 | 协议 | 备注 |
---|---|---|---|
Web 服务(HTTP) | 80 | TCP | |
Web 服务(HTTPS) | 443 | TCP | |
DSM 服务(HTTP) | 5000 | TCP | 默认值可修改 |
DSM 服务(HTTPS) | 5001 | TCP | 默认值可修改 |
SSH 服务 | 22 | TCP | 默认值可修改,默认服务关闭 |
Files | 5000 | TCP | 随着群晖 Web 服务变动 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# icyleaf | |
# 2020-02-03 | |
# | |
VM_NAME=$1 | |
IMG_FILE=$2 | |
IMG_PATH=`dirname $IMG_FILE` | |
IMG_NAME=`basename $IMG_FILE` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 获取 apk 的证书 | |
keytool -list -printcert -jarfile app.apk | |
# 获取 apk 解包后 CERT.{RSA|DSA} 的证书 | |
keytool -printcert -file app/META-INF/CERT.{RSA|DSA} | |
# 获取 keystore 的证书 | |
keytool -list -keystore app.keystore -storepass {password} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"backcolor": "#222222", | |
"name": "Wanyoo yKeyboard 78 key", | |
"author": "icyleaf", | |
"pcb": false | |
}, | |
[ | |
{ | |
"c": "#282828", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <netdb.h> | |
#include <ifaddrs.h> | |
#include <arpa/inet.h> | |
+ (NSArray *)loopUpIPAddress:(NSURL *)url { | |
NSMutableArray *ipAddrs = [[NSMutableArray alloc] init]; | |
char **pptr; | |
struct hostent *_host = gethostbyname([[url host] UTF8String]); | |
pptr = _host->h_addr_list; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image = MiniMagick::Image.open('source.jpg') | |
image.colorspace 'gray' | |
pixels = image.get_pixels | |
0.upto(image.height - 1) do |y| | |
image.combine_options do |c| | |
0.upto(image.width - 1) do |x| | |
color = pixels[y][x][0] |