Skip to content

Instantly share code, notes, and snippets.

View LnsooXD's full-sized avatar

LnsooXD LnsooXD

View GitHub Profile
@LnsooXD
LnsooXD / viewport.js
Created April 18, 2022 14:21
viewport.js
(() => {
const initViewport = () => {
const width = 375; // 设计稿宽度
const scale = window.outerWidth / width
let meta = document.querySelector('meta[name=viewport]')
let content = `width=${width}, initial-scale=${scale}, user-scalable=no`
if (!meta) {
meta = document.createElement('meta')
meta.setAttribute('name', 'viewport')
document.head.appendChild(meta)

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件