使用容器快速创建远程桌面的GUI连接
技术实现:
- Guacamole Server
- xrdp Server
package main | |
import ( | |
"context" | |
"encoding/hex" | |
"fmt" | |
"github.com/ethereum/go-ethereum/accounts/abi" | |
"github.com/ethereum/go-ethereum/common" | |
"github.com/ethereum/go-ethereum/core/types" | |
"github.com/ethereum/go-ethereum/ethclient" |
from telethon import TelegramClient, events | |
import pathlib | |
# Remember to use your own values from my.telegram.org! | |
api_id = 12345 | |
api_hash = '0123456789abcdef0123456789abcdef' | |
# Replace the checkin bot and text with yourown | |
checkin_at_bot_id = '@checkin_bot' | |
checkin_text = '/checkin' |
#!/usr/bin/env bash | |
# 配置参考: | |
# https://github.com/shadowsocks/shadowsocks-libev/blob/master/docker/alpine/README.md | |
SERVER_ADDR="your_server_ip" | |
SERVER_PORT="your_server_port" | |
PASSWORD="your_password" | |
METHOD="aes-256-cfb" | |
TIMEOUT=300 |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# common config for master and node | |
config.vm.provision "shell", path: "init.sh" | |
config.vm.box = "gyptazy/ubuntu22.04-arm64" | |
config.vm.box_check_update = false |
# get current ec2 AutoScaling group name | |
# note: change region option as yours | |
aws autoscaling describe-auto-scaling-instances --region us-east-1 --output text --query=AutoScalingInstances[].AutoScalingGroupName --instance-ids=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) |
import com.github.crazygit.tikheart.TikHeartApplication | |
import com.github.crazygit.tikheart.data.dao.UserInfoDao | |
import com.github.crazygit.tikheart.data.model.UserInfo | |
import com.github.crazygit.tikheart.utilities.LocalStorage | |
object LocalRepository { | |
private val localStorage = LocalStorage(TikHeartApplication.appContext) | |
private val localUserDao = UserInfoDao(localStorage) |
多集群的配置文件管理,可以在~/.kube/
目录中,放置多个集群的配置文件,如
~/.kube/cluster_a.yaml
~/.kube/cluster_b.yaml
~/.kube/cluster_c.yaml
然后配置环境变量
from scrapy.loader.processors import Compose, MapCompose | |
proc = Compose(lambda v: v[0], str.upper) | |
proc(['hello', 'world']) # HELLO | |
mproc = MapCompose(lambda v: v[0], str.upper) | |
mproc(['hello', 'world']) # ['H', 'W'] |
# bare secure mode: no https, no basic auth | |
version: '3.8' | |
services: | |
reverse_proxy: | |
image: traefik:v2.6 | |
command: | |
# - "--log.level=DEBUG" | |
# Enable Docker in Traefik, so that it reads labels from Docker services | |
- "--providers.docker" |