This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os, sys | |
print('Content-Type: text/html; charset=utf-8') | |
print('') | |
print('<!DOCTYPE html>') | |
print('<html>') | |
print('<head>') | |
print('<meta charset="utf-8" />') | |
print('<meta name="viewport" content="width=device-width, initial-scale=1.0">') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, chardet | |
with open(sys.argv[1], 'rb') as f: | |
result = chardet.detect(f.read()) | |
print(result['encoding']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:7 | |
LABEL Remarks="This is a dockerfile example for Centos system" | |
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* | |
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* | |
RUN yum -y update && yum -y install httpd && yum clean all | |
# ADD ./site/html.tar.gz /var/www/html/ | |
EXPOSE 80 | |
CMD ["apachectl", "-D", "FOREGROUND"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta | |
name="viewport" | |
content="width=device-width, initial-scale=1.0" | |
/> | |
<title>MyTube</title> | |
<style> |
OlderNewer