This way a Python daemon can be installed on Rasbian, Ubuntu or similar systems using systemd.
Installing:
sudo cp hello.service /lib/systemd/system/hello.service
sudo systemctl daemon-reload
sudo systemctl enable hello.service
| #!/bin/bash | |
| # init_centos shell | |
| #安装说明参见 https://sadsu.com/?p=266 | |
| #----------------------------------------------------------# | |
| # Variables&Functions # | |
| #----------------------------------------------------------# | |
| red='\033[0;31m' | |
| green='\033[0;32m' | |
| yellow='\033[0;33m' | |
| plain='\033[0m' |
| #!/usr/bin/env bash | |
| set -x -e | |
| JUPYTER_PASSWORD=${1:-"myJupyterPassword"} | |
| NOTEBOOK_DIR=${2:-"s3://myS3Bucket/notebooks/"} | |
| # home backup | |
| if [ ! -d /mnt/home_backup ]; then | |
| sudo mkdir /mnt/home_backup | |
| sudo cp -a /home/* /mnt/home_backup |
| provider "aws" { | |
| region = "eu-west-1" | |
| access_key = "" | |
| secret_key = "" | |
| } | |
| resource "aws_instance" "example" { | |
| ami = "${var.ami-mine}" | |
| instance_type = "t2.micro" | |
| key_name = "rajesh" |
| From self[at]sungpae.com Mon Nov 8 16:59:48 2021 | |
| Date: Mon, 8 Nov 2021 16:59:48 -0600 | |
| From: Sung Pae <self[at]sungpae.com> | |
| To: security@docker.com | |
| Subject: Permissive forwarding rule leads to unintentional exposure of | |
| containers to external hosts | |
| Message-ID: <YYmr4l1isfH9VQCn@SHANGRILA> | |
| MIME-Version: 1.0 | |
| Content-Type: multipart/signed; micalg=pgp-sha256; | |
| protocol="application/pgp-signature"; boundary="QR1yLfEBO/zgxYVA" |
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: argocd-server-ingress-grpc | |
| namespace: argocd | |
| annotations: | |
| kubernetes.io/ingress.class: haproxy | |
| haproxy.org/backend-protocol: "grpc" | |
| haproxy.org/ssl-certificate: "argocd/<yourdomain-tls-secret-name>" | |
| spec: |
| public class Backtrack { | |
| public static List<List<Object>> backtrack(int[] A) { | |
| // Set up a list of list to hold all possible solutions | |
| List<List<Object>> result = new LinkedList<List<Object>>(); | |
| if (A == null || A.length == 0) { | |
| return result; | |
| } | |
| // As we need to recursively generate every solution, | |
| // a variable is needed to store single solution. |