Skip to content

Instantly share code, notes, and snippets.

@swdream
swdream / cache_sbt.md
Last active September 21, 2018 06:45
# some parts originally from https://github.com/randm-ch/units-of-information/blob/master/.gitlab-ci.yml

image: "hseeberger/scala-sbt:8u141-jdk_2.12.3_1.0.2"

variables:
  SBT_OPTS: "-Dsbt.global.base=sbt-cache/sbtboot -Dsbt.boot.directory=sbt-cache/boot -Dsbt.ivy.home=sbt-cache/ivy"
  COURSIER_CACHE: sbt-cache/coursier #only needed if you use coursier

@swdream
swdream / html.md
Last active September 10, 2018 10:01

Images

<td align="center">

button:

        <div class="row">

Có thể cài phần mềm studio 3T để quản lý Mongodb database

Sử dụng với Flask

Packages

  • Flask-PyMongo

Khai báo config

http://s2phim.net/xem-phim/7-dieu-uoc-cua-quy/127196/
@swdream
swdream / aws.md
Last active August 30, 2018 04:14

IAM

Identity and Access Management

  • Create users and groups
  • Control the permission of user and groups to access AWS resources (using role).

IAM Role

Role cho phép bạn DELEGATE - Uỷ Quyền access cho user/group hoặc các service của AWS TỚI các aws service khác.

@swdream
swdream / mongodb.md
Last active September 14, 2018 08:33

update:

import pymongo

myclient = pymongo.MongoClient("mongodb://localhost:27017/")
mydb = myclient["mydatabase"]
mycol = mydb["customers"]
@swdream
swdream / python.md
Last active September 10, 2018 10:31

Boolean

  • True

  • False

  • and or not

List

1. Root partition là data partition quan trọng nhất trong Linux enterprise and Unix system và là non-swap filesystem duy nhất được
được yêu cầu trong quá trình boot một unix hay linux system.
2. Root partition được mount tới root directory - the root filesystem của linux/unix system.
3. Root filesystem chứa các thư mục/file được yêu cầu để boot linux/unix system:
- thư mục mà qua đó các devices access (/dev)
- thư mục chứa các initialization và config file (/etc)
- thư mục chứa các libraries, system modules, security ... (/lib)
- thư mục chứa các file system binaries (/bin,/sbin)
Lý do khi có một file log lớn, khi đó sẽ làm root partition bị full.
  1. ping all hosts:
ansible all -m ping
  1. using user
ansible all -m ping -u bruce

Concepts:

  • groups: set of hosts
  • facts: contains all info about remote host.
  • Ansible facts are a way of getting data about remote systems for use in playbook variables.
1. these operating systems, Ansible will fallback into using a high-quality Python implementation of OpenSSH called ‘paramiko’.
2. By default, ansible read remote hosts in /etc/ansible/hosts, it is an inventory file.