国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| <?xml version='1.0' encoding='UTF-8'?> | |
| <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
| <fontconfig> | |
| <match target="font"> | |
| <edit mode="assign" name="antialias"> | |
| <bool>true</bool> | |
| </edit> | |
| <edit mode="assign" name="hinting"> | |
| <bool>true</bool> | |
| </edit> |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| # create folders if does not exist | |
| mkdir -p ~/.fonts | |
| mkdir -p ~/.config/fontconfig/ | |
| # download noto color emoji font from https://www.google.com/get/noto/#emoji-zsye-color | |
| # extract NotoColorEmoji.ttf file into ~/.fonts/ | |
| # create font config file | |
| cat << 'EOF' > ~/.config/fontconfig/fonts.conf | |
| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"> |
| #!/bin/bash | |
| # update apt-get | |
| export DEBIAN_FRONTEND="noninteractive" | |
| sudo apt-get update | |
| # remove previously installed Docker | |
| sudo apt-get purge lxc-docker* | |
| sudo apt-get purge docker.io* |
| #! /usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # @author weishu @2015/12/7 | |
| import subprocess | |
| import os | |
| import re | |
| import json |
ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"| # using VirtualBox version $VBOX_VERSION | |
| FROM boot2docker/boot2docker | |
| RUN apt-get install p7zip-full | |
| RUN mkdir -p /vboxguest && \ | |
| cd /vboxguest && \ | |
| curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \ | |
| 7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \ | |
| sh VBoxLinuxAdditions.run --noexec --target . && \ |
| //附加公共参数 | |
| $http.global("token","abcd321"); | |
| $http.use("/api", function (res) { | |
| if (res.success) { | |
| return true; | |
| } | |
| var err = res.error; | |
| if (err.code === 1001) { | |
| location.href = "/login.html"; | |
| } else { |
Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.
Will need to create a directory to hold cache files, for the example given here that would be:
$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi