详细的英文配置
https://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/
xcode-select --install
详细的英文配置
https://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/
xcode-select --install
import Foundation | |
import Alamofire | |
open class ProtobufParameterEncoder: ParameterEncoder { | |
/// Returns an encoder with default parameters. | |
public static var `default`: ProtobufParameterEncoder { ProtobufParameterEncoder() } | |
public init() {} |
route = 8.0.0.0/255.0.0.0 | |
route = 58.0.0.0/255.0.0.0 | |
route = 23.0.0.0/255.0.0.0 | |
route = 117.0.0.0/255.0.0.0 | |
route = 199.0.0.0/255.0.0.0 | |
route = 190.0.0.0/255.0.0.0 | |
route = 198.0.0.0/255.0.0.0 | |
route = 173.0.0.0/255.0.0.0 | |
route = 174.0.0.0/255.0.0.0 | |
route = 168.0.0.0/255.0.0.0 |
#utf-8 | |
require 'netaddr' | |
newfile = File.open("some_file", "w") | |
File.foreach('out_ip').with_index { |line, line_num| | |
line = line.split(',')[0].to_s | |
a = NetAddr::CIDR.create(line) | |
puts "#{a.ip}/#{a.wildcard_mask}" | |
newfile.write("route = #{a.ip}/#{a.wildcard_mask}\n") |
/// Define | |
extension Validator where T == String { | |
/// Validates whether a `String` is a valid email address. | |
public static var zipCode: Validator<T> { | |
.init { | |
guard | |
let range = $0.range(of: zipCodeRegex, options: [.regularExpression]), | |
range.lowerBound == $0.startIndex && range.upperBound == $0.endIndex | |
else { | |
return ValidatorResults.ZipCode(isValidZipCode: false) |
# albatross | |
version: '3.7' | |
services: | |
app: | |
image: ghcr.io/kevinzhow/albatross:latest | |
restart: unless-stopped | |
environment: | |
LOG_LEVEL: ${LOG_LEVEL:-debug} | |
ADMIN_USERNAME: albatross |
extension AppThemeModeExt on AppThemeMode { | |
AppThemeData get themeData { | |
switch (this) { | |
case AppThemeMode.light: | |
return AppThemeData( | |
primaryColor: Color(0xFF28AA4B), | |
backgroundColor: Colors.white, | |
tileColor: Colors.white, | |
tableColor: Color(0xFFF3F3F3), | |
titleColor: Colors.black, |
// | |
// GzipMiddleware.swift | |
// GzipMiddleware | |
// | |
// Created by 周楷雯 on 2021/9/8. | |
// | |
// MARK: use https://docs.vapor.codes/4.0/server/#response-compression instead of this script | |
// MARK: Use this at end of app.middleware |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: ocserv | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO | |
# Copyright Rene Mayrhofer, Gibraltar, 1999 | |
# This script is distibuted under the GPL |