Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus| #!/bin/bash | |
| # Parameters | |
| socket="/run/foo.sock" | |
| dump="/tmp/capture.pcap" | |
| # Extract repetition | |
| port=9876 | |
| source_socket="$(dirname "${socket}")/$(basename "${socket}").orig" |
| #!/usr/bin/perl | |
| # command from: | |
| # http://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-split-mpg-files-using-a-ffmpeg-command-542607/ | |
| # -vcodec copy copies the raw data | |
| # -ss start seconds? | |
| # -to ? | |
| my $infile = shift; |
| # This is an example for building the open source components of Docker for Mac | |
| kernel: | |
| image: linuxkit/kernel:4.14.39 | |
| cmdline: "console=ttyS0 page_poison=1" | |
| init: | |
| - linuxkit/vpnkit-expose-port:4e2ea826aaefdd196c7473255654d06ad96c4c21 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host | |
| - linuxkit/init:11929b0007b87384f7372e9265067479c4616586 | |
| - linuxkit/runc:acba8886e4b1318457c711700f695a02fef9493d | |
| - linuxkit/containerd:f197e7cbb2ede4370b75127c76de6f7b2e3d9873 | |
| - linuxkit/ca-certificates:fb5c7bf842a330f5b47cdf71f950fe0c85f4a772 |
| #!/bin/bash | |
| set -ex | |
| # we can use docker image centos:7 to build | |
| # install tools to build | |
| yum install gcc kernel-devel make ncurses-devel file -y | |
| alias make="make -j" | |
| TARGETDIR=$1 | |
| if [ "$TARGETDIR" = "" ]; then | |
| TARGETDIR=$(python -c 'import os; print os.path.realpath("local")') | |
| fi |
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
| 1 普通匹配,遵循最长匹配规则,假设一个请求匹配到了两个普通规则,则选择匹配长度大的那个 | |
| 例如: | |
| location /{ | |
| [matches] | |
| } | |
| location /test{ | |
| [matches] | |
| } | |
| 2 精确匹配 | |
| location = /{ |
| # Optimized MySQL configuration by Fotis Evangelou - Updated July 2017 | |
| # | |
| # The settings provided below are a starting point for a 4GB - 8GB RAM server with 4 CPU cores. | |
| # If you have less or more resources available you should adjust accordingly to save CPU, | |
| # RAM and disk I/O usage. | |
| # The settings marked with a specific comment or the word "UPD" after the value | |
| # should be adjusted for your system by using MySQL DB diagnostics tools like: | |
| # http://mysqltuner.com/ | |
| # or | |
| # https://launchpad.net/mysql-tuning-primer (supports MySQL up to v5.6) |
| def new_user(admin_username, admin_password): | |
| env.user = 'root' | |
| # Create the admin group and add it to the sudoers file | |
| admin_group = 'admin' | |
| runcmd('addgroup {group}'.format(group=admin_group)) | |
| runcmd('echo "%{group} ALL=(ALL) ALL" >> /etc/sudoers'.format( | |
| group=admin_group)) | |
| # Create the new admin user (default group=username); add to admin group |