Skip to content

Instantly share code, notes, and snippets.

@hsSam
hsSam / style.dart
Last active June 25, 2019 03:32
[flutter css style] flutter css sytle use #flutter
//container
Container(
width: 200.0,
height: 200.0,
color: Colors.green,
margin: EdgeInsets.symmetric(vertical: 20.0),
);
// Color
Color _color = Colors.green;
@hsSam
hsSam / random.dart
Created June 24, 2019 08:37
[flutter random] random value #flutter
final random = Random();
// Generate a random width and height.
_width = random.nextInt(300).toDouble();
_height = random.nextInt(300).toDouble();
final r = random.nextInt(256);
final g = random.nextInt(256);
final b = random.nextInt(256);
@hsSam
hsSam / nginx.conf
Created March 20, 2018 14:03 — forked from fotock/nginx.conf
Nginx SSL 安全配置最佳实践.
# 生成 dhparam.pem 文件, 在命令行执行任一方法:
# 方法1: 很慢
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# 方法2: 较快
# 与方法1无明显区别. 2048位也足够用, 4096更强
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096
@hsSam
hsSam / nginx.conf
Created March 20, 2018 14:02 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048