中文乱码的根源在于 windows 基于一些历史原因无法全面支持 utf-8 编码格式,并且也无法通过有效手段令其全面支持。
- 安装
| #!/bin/sh -xe | |
| yum install -y wget gcc make automake autoconf | |
| export SRC_DIR=/data/server/src | |
| export PHP_VERSION=7.1.5 | |
| export HTTPD_VERSION=2.4.25 | |
| export HTTPD_PREFIX=/data/server/httpd-$HTTPD_VERSION | |
| export PHP_PREFIX=/data/server/php-$PHP_VERSION |
| <?php | |
| // 修复项目的document_root | |
| // 备份server以备后查 | |
| $GLOBALS['_SERVER_OLD'] = $_SERVER; | |
| // 修改DOCUMENT_ROOT等环境变量 | |
| $_SERVER['DOCUMENT_ROOT'] = __DIR__; | |
| $_SERVER['CONTEXT_DOCUMENT_ROOT'] = $_SERVER['DOCUMENT_ROOT']; |
| // Make gulp-css-base64 run async... | |
| // Inspired by gulp-css-base64 | |
| // Optimized str.replace, fs.readFileSync, url.split... | |
| // fixed bug: global regex should not be used concurrently. | |
| // NodeJS library | |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var mime = require('mime'); | |
| var util = require('util'); | |
| var Stream = require('stream').Stream; |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" | |
| content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>CSS3 Marquee Test</title> | |
| <style> | |
| .marquee{ |
| .AppHeader-inner, | |
| .Footer, | |
| .Card.AppBanner, | |
| .Card[data-za-module=RelatedLives]{ | |
| display: none !important; | |
| } | |
| .Card{ | |
| position: relative; | |
| z-index: 1; | |
| } |
| <?php | |
| // 运行: | |
| // php simple-httpd-helloworld.php [port] | |
| // 默认端口号是80,可以通过命令行第一个参数指定端口号。 | |
| // 注意:需要支持pcntl和socket(不能在windows下跑 -- 可以在windows下的bash on ubuntu on windows中跑) | |
| declare(ticks = 1); |
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import sys | |
| import logging | |
| import datetime | |
| import requests | |
| import BeautifulSoup | |
| from requests.adapters import HTTPAdapter |
| background: linear-gradient(207deg, #10ec6f, #172de1); | |
| background-size: 400% 400%; | |
| -webkit-animation: test 6s ease infinite; | |
| -moz-animation: test 6s ease infinite; | |
| -o-animation: test 6s ease infinite; | |
| animation: test 6s ease infinite; | |
| @-webkit-keyframes test { | |
| 0%{background-position:58% 0%} | |
| 50%{background-position:43% 100%} | |
| 100%{background-position:58% 0%} |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |