Instalando Docker em um WSL 2 com Ubuntu 22.04
Before start the installation process, make sure you meet the following prerequisites:
- A Windows 10 operating system with WSL 2 support.
- WSL 2 enabled.
- Ubuntu 22.04 installed on WSL 2.
| import { | |
| createStyles, | |
| Paper, | |
| Table, | |
| TableBody, | |
| TableCell, | |
| TableHead, | |
| TableRow, | |
| Theme, | |
| withStyles, |
| #!/bin/bash | |
| ######################################## | |
| # | |
| # 使用youtube-dl库下载 | |
| # https://github.com/rg3/youtube-dl | |
| # | |
| ######################################## | |
| # 腾飞五千年系列———中华文明起源 |
| AWSTemplateFormatVersion: 2010-09-09 | |
| Resources: | |
| Bucket: | |
| Type: 'AWS::S3::Bucket' | |
| Properties: | |
| AccessControl: PublicRead | |
| WebsiteConfiguration: | |
| IndexDocument: index.html | |
| ErrorDocument: error.html | |
| Distro: |
| Installing mysql 5.7 on centos 6 | |
| 1. download yum repo | |
| wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm | |
| 2. install yum repo | |
| yum -y localinstall mysql57-community-release-el6-7.noarch.rpm | |
| 3. verify yum repo | |
| yum repolist enabled | grep "mysql.*-community.*" |
| import os | |
| LOGS_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'logs') | |
| LOGGING = { | |
| 'version': 1, | |
| 'dusable_existing_loggers': True, | |
| 'formatters': { | |
| 'normal': { | |
| 'format': '%(levelname)s %(asctime)s %(module)s %(message)s' |
| /* Example implementation of password hasher similar to Django's PasswordHasher | |
| * Requires Java8 (but should be easy to port to older JREs) | |
| * Currently it would work only for pbkdf2_sha256 algorithm | |
| * | |
| * Django code: https://github.com/django/django/blob/1.6.5/django/contrib/auth/hashers.py#L221 | |
| */ | |
| import java.nio.charset.Charset; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.spec.InvalidKeySpecException; | |
| import java.security.spec.KeySpec; |
| # source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
| yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
| mkdir ~/ffmpeg_sources | |
| cd ~/ffmpeg_sources | |
| curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
| tar xzvf yasm-1.2.0.tar.gz | |
| cd yasm-1.2.0 |
| # coding=utf8 | |
| import PIL | |
| from PIL import ImageFont | |
| from PIL import Image | |
| from PIL import ImageDraw | |
| def text2png(text, fullpath, color = "#000", bgcolor = "#FFF", fontfullpath = None, fontsize = 13, leftpadding = 3, rightpadding = 3, width = 200): | |
| REPLACEMENT_CHARACTER = u'\uFFFD' | |
| NEWLINE_REPLACEMENT_STRING = ' ' + REPLACEMENT_CHARACTER + ' ' |