To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
It seems that it does not matter what timezone is on the server as long as you have the time set right for the current timezone, know the timezone of the datetime columns that you store, and are aware of the issues with daylight savings time.
On the other hand if you have control of the timezones of the servers you work with then you can have everything set to UTC internally and never worry about timezones and DST.
Here are some notes I collected of how to work with timezones as a form of cheatsheet for myself and others which might influence what timezone the person will choose for his/her server and how he/she will store date and time.
# The setup command allows filtering facts | |
# More info: https://docs.ansible.com/ansible/latest/modules/setup_module.html | |
# inventory_file = path to inventory file (if not normal role layout) | |
# host_group = group to query. use all for all hosts | |
ansible -i inventory_file host_group -m setup -a 'filter=ansible_distribution_version' | |
# For a Ubuntu Bionic Host the distribution facts look like this: | |
# "ansible_distribution": "Ubuntu", | |
# "ansible_distribution_file_parsed": true, | |
# "ansible_distribution_file_path": "/etc/os-release", |
package main | |
import ( | |
"bytes" | |
"compress/gzip" | |
"fmt" | |
"io" | |
"log" | |
) |
#!/bin/sh | |
echo 'use "curl -sSL git.io/corefile | bash" to update Corefile' | |
echo "remember to change 192.168.1.1 to your ISP's DNS server address or use public DNS server such as 114/DNSPod etc. directly" | |
china=`curl -sSL https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf | while read line; do awk -F '/' '{print $2}' | grep -v '#' ; done | paste -sd " " -` | |
apple=`curl -sSL https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf | while read line; do awk -F '/' '{print $2}' | grep -v '#' ; done | paste -sd " " -` | |
google=`curl -sSL https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/google.china.conf | while read line; do awk -F '/' '{print $2}' | grep -v '#' ; done | paste -sd " " -` | |
bogus=`curl -sSL https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf | grep "=" | while read line; do awk -F '=' '{print $2}' | grep -v '#' ; done | paste -sd " " -` | |
cat>Corefile |
# 概述:一共三大部分配置。 | |
# 其中#注释掉的可以在需要的时候开启并修改,没有注释掉的(除了下面location示例)不要删掉,基本都是必须的配置项。 | |
###############################第一部分 全局配置############################ | |
#user nobody; 指定启动进程的用户,默认不用指定即可。 | |
#error_log logs/error.log; 配置日志输出,虽然叫error_log但是可以定义输出的级别,默认不写是ERROR级别 | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; 记录pid的文件,默认就是放到这个位置,可以修改。 |