yaml Contao Manager umbenannt

KonfigurationfürumbenanntenContao Manager

config.yml
contao_manager:
    manager_path: cm.phar.php

yaml 人物简介 - 紧凑型预告组件

person-compact-teaser.scss
// Styling overrides for person content type.

// Import site utilities.
@import '../../00-global/utils/init';

.person {
  display: flex;
}

.person__image {
  width: 38px;
  height: 38px;

  img {
    border-radius: 50%;
  }
}

.person__details {
  color: $color-pwc-gray;
  font-size: 0.85rem;
  margin-left: 1rem;
}

.person__name {
  font-weight: $font-weight-bold;
}
person-compact-teaser.twig
{{ attach_library('pwc_bw3_theme/person-compact-teaser') }}
{% import '@pwc_bw3_theme/icons/_icons.twig' as icons %}

{%
  set classes = [
    'person'
  ]
%}

{% set attributes = attributes ? attributes.addClass(classes) : ' class="' ~ classes|join(' ') ~ '"' %}

<article {{ attributes|raw }}>
  {{ title_prefix }}
  {{ title_suffix }}

  {% if person.photo %}
    <div class="person__image">
      {{ person.photo }}
    </div>
  {% endif %}

  <div class="person__details">

    <div class="person__name">
      {{ 'By'|t }}: {{ person.name }}
    </div>

    {% if person.title %}
      <div class="person__title">
        {{ person.title }}
      </div>
    {% endif %}

  </div>
</article>
person-compact-teaser.yml
person:
  photo: "<img src='https://unsplash.it/100/100' alt='profile teaser placeholder' />"
  title: Front-End Developer
  name: First Last

yaml 在Windows环境中为外部应用程序创建并运行mariadb容器

它用于创建和运行mariadb容器和同步数据库文件与您的Windows文件系统在提供的位置,该位置当前在此脚本中设置为`f:/ Docker / mysql_data / app_demo`

docker-compose.yml
version: "3.6"
services:
  app_demo_db:
    image: mariadb:10.3.16
    container_name: app_demo_db
    restart: unless-stopped
    ports:
      - "6603:3306"
#    command: "--default-authentication-plugin=mysql_native_password"
    environment:
      - MYSQL_ROOT_PASSWORD=root123
      - MYSQL_USER=app
      - MYSQL_PASSWORD=app123
      - MYSQL_DATABASE=app_demo
    volumes:
      - f:/Docker/mysql_data/app_demo:/var/lib/mysql
    command:
      # this below command is used to sync database files with your windows host machine at location `f:/Docker/mysql_data/app_demo`
      'mysqld --innodb-flush-method=fsync'
      # mysqld --innodb-flush-method=littlesync --innodb-use-native-aio=OFF --log_bin=ON

volumes:
  mysql_data:

yaml 内置变量

version.yml
# centos7 ansible 2.8.2+
"ansible_distribution": "CentOS",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/redhat-release",
"ansible_distribution_file_variety": "RedHat",
"ansible_distribution_major_version": "7",
"ansible_distribution_release": "Core",
"ansible_distribution_version": "7.5


"ansible_lsb": {
    "codename": "Core",
    "description": "CentOS Linux release 7.5.1804 (Core)",
    "id": "CentOS",
    "major_release": "7",
    "release": "7.5.1804"
}

yaml Docker kafka e zookeeper

docker-compose
version: '3'
services:
  zookeeper:
    image: wurstmeister/zookeeper:3.4.6
    ports:
      - "2181:2181"
    networks:
      - kafka
  kafka:
    image: wurstmeister/kafka:2.11-2.0.1
    ports:
      - "9092:9092"
    environment:
      KAFKA_ADVERTISED_HOST_NAME: 172.17.0.1
      KAFKA_CREATE_TOPICS: "event.operations.specific.deposits.currentaccount.created:1:1,event.operations.specific.deposits.currentaccount.opened:1:1,event.operations.specific.deposits.currentaccount.failed:1:1,event.operations.cross.accountmngmt.frauddetection.checked:1:1,event.sales.customermngmt.creditrating.checked:1:1,event.sales.servicing.cardcase.issued:1:1,event.operations.specific.deposits.savingsaccount.opened:1:1"
      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
    networks:
      - kafka
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

networks:
  kafka:

yaml docker-compose for workpress

docker-compose for workpress

docker-compose.yml
version: '3'

services:

  wordpress:
    image: wordpress
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: mysql
      WORDPRESS_DB_PASSWORD: root
    networks:
      - my-bridge

  mysql:
    image: mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: wordpress
    volumes:
      - mysql-data:/var/lib/mysql
    networks:
      - my-bridge

volumes:
  mysql-data:

networks:
  my-bridge:
    driver: bridge

yaml [删除横幅,应用主题,字体和加载图像代码] #flutter #dart #themes #debugShowCheckedModeBanner

[删除横幅,应用主题,字体和加载图像代码] #flutter #dart #themes #debugShowCheckedModeBanner

example_banner.dart
class $1 extends StatefulWidget {
  const $1();
  @override
  _$2 createState() => _$2();
}

class $2 extends State<$1> {

  const $2();
  
  static const _icons = <String>[
      'assets/icons/img1.png',
      'assets/icons/img2.png',
      'assets/icons/img3.png',
      'assets/icons/img4.png',
      'assets/icons/img5.png',
      'assets/icons/img6.png',
      'assets/icons/img7.png',
      'assets/icons/img8.png',
    ];

  Widget build(BuildContext context) {
      return MaterialApp(
                   debugShowCheckedModeBanner: false,
                   title: 'My APP',
                   theme: ThemeData(
                     fontFamily: 'Raleway',
                     textTheme: Theme.of(context).textTheme.apply(
                           bodyColor: Colors.black,
                           displayColor: Colors.grey[600],
                         ),
                     primaryColor: Colors.grey[500],
                     textSelectionHandleColor: Colors.green[500],
                   ),
                   home: Image.asset(_icons[iconLocation]),
                 );
  }
}
example_pubspec.yaml
  assets:
   - assets/data/my_data.json
   - assets/icons/img1.png
   - assets/icons/img2.png
   - assets/icons/img3.png
   - assets/icons/img4.png
   - assets/icons/img5.png
   - assets/icons/img6.png
   - assets/icons/img7.png
   - assets/icons/img8.png
  fonts:
   - family: Raleway
     fonts:
      - asset: third_party/Raleway-Regular.ttf   

yaml ansible片段

ansible_snippet.yml
# main.ymlで悩む?ところについて記載

---
- hosts: hoge
  roles:
    - ../hoge-hoge
  become: yes
  tasks:
  - name: list isntalled of td-agent
    yum:
      list: td-agent
    register: yum_list_package

  - name: Install td-agent
    shell: curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh
    when: yum_list_package.results | selectattr("yumstate", "match", "installed") | list | length == 0

yaml MkDocs YAML

mkdocs.yml
## PROJECT INFORMATION
site_name: My Docs          # [REQ] main title of the project documentation
site_url: http://...        # add a link tag with the canonical URL to the generated HTML header
repo_url: http://...        # provides a link to your repository on each page
repo_name: My_repo          # provides the name for the link to your repository on each page

yaml 普罗米修斯运营商

deployment.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
    name: prometheus-operator
roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: ClusterRole
    name: prometheus-operator
subjects:
    - kind: ServiceAccount
      name: prometheus-operator
      namespace: {{ .Values.nameSpace }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
    name: prometheus-operator
rules:
    - apiGroups:
          - extensions
      resources:
          - thirdpartyresources
      verbs:
          - "*"
    - apiGroups:
          - apiextensions.k8s.io
      resources:
          - customresourcedefinitions
      verbs:
          - "*"
    - apiGroups:
          - monitoring.coreos.com
      resources:
          - alertmanagers
          - prometheuses
          - prometheuses/finalizers
          - servicemonitors
      verbs:
          - "*"
    - apiGroups:
          - apps
      resources:
          - statefulsets
      verbs: ["*"]
    - apiGroups: [""]
      resources:
          - configmaps
          - secrets
      verbs: ["*"]
    - apiGroups: [""]
      resources:
          - pods
      verbs: ["list", "delete"]
    - apiGroups: [""]
      resources:
          - services
          - endpoints
      verbs: ["get", "create", "update"]
    - apiGroups: [""]
      resources:
          - nodes
      verbs: ["list", "watch"]
    - apiGroups: [""]
      resources:
          - namespaces
      verbs: ["list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
    name: prometheus-operator
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
    labels:
        k8s-app: prometheus-operator
    name: prometheus-operator
spec:
    replicas: 1
    template:
        metadata:
            labels:
                k8s-app: prometheus-operator
        spec:
            containers:
                - args:
                      - --kubelet-service=kube-system/kubelet
                      - --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
                  image: quay.io/coreos/prometheus-operator:v0.17.0
                  name: prometheus-operator
                  ports:
                      - containerPort: 8080
                        name: http
                  resources:
                      limits:
                          cpu: 200m
                          memory: 100Mi
                      requests:
                          cpu: 100m
                          memory: 50Mi
            securityContext:
                runAsNonRoot: true
                runAsUser: 65534
            serviceAccountName: prometheus-operator
---
apiVersion: v1
kind: ServiceAccount
metadata:
    name: prometheus
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
    name: prometheus
rules:
    - apiGroups: [""]
      resources:
          - nodes
          - services
          - endpoints
          - pods
      verbs: ["get", "list", "watch"]
    - apiGroups: [""]
      resources:
          - configmaps
      verbs: ["get"]
    - nonResourceURLs: ["/metrics"]
      verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
    name: prometheus
roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: ClusterRole
    name: prometheus
subjects:
    - kind: ServiceAccount
      name: prometheus
      namespace: {{ .Values.nameSpace }}