Skip to content

Instantly share code, notes, and snippets.

li-wu / openssl_example.cpp
Last active September 28, 2022 07:44
Example for signing message with private key and validation with public key with OpenSSL 3.0
// This gist is taken from with changes to migrate to OpenSSL 3.0
#include <iostream>
#include <openssl/aes.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
yum install -y yum-utils
yum install -y nfs-utils
yum install -y socat
yum install -y conntrack-tools
yum-config-manager --add-repo
yum install -y docker-ce docker-ce-cli
systemctl start docker
systemctl enable docker
kind: ClusterRole
name: flannel
- apiGroups:
- ""
- pods
li-wu / handle_file.js
Created December 24, 2018 06:58
Using koa to handle file upload
const fs = require('fs')
const app = new Koa()
const router = new Router()
const serve = require('koa-static')
const koaBody = require('koa-body')
.use(serve(__dirname + '/files')) // files文件夹用于保存上传的文件,也是静态资源地址
apiVersion: v1
kind: Namespace
name: production
apiVersion: v1
kind: Namespace
name: development
Write-Host "Creating necessary user account"
$pw = ConvertTo-SecureString -String "sshd_password" -AsPlainText -Force
New-LocalUser -Name sshd -Password $pw -PasswordNeverExpires -AccountNeverExpires
Add-LocalGroupMember -Group Administrators -Member sshd
Write-Host "Installing Cygwin"
Invoke-WebRequest -OutFile C:\setup-x86_64.exe
Start-Process C:\setup-x86_64.exe -Wait -NoNewWindow -ArgumentList "-q -n -l C:\cygwin64\packages -s -R C:\cygwin64 -P python-devel,openssh,cygrunsrv,wget,tar,qawk,bzip2,subversion,vim,make,gcc-fortran,gcc-g++,gcc-core,make,openssl,openssl-devel,libffi-devel,libyaml-devel,git,zip,unzip,gdb,libsasl2,gettext"
Remove-Item C:\setup-x86_64.exe