Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| #!/bin/bash | |
| # Instal php5.6 with phpbrew on ubuntu 18.04 | |
| # Install all dependencies | |
| sudo apt update | |
| sudo apt install wget php build-essential libxml2-dev libxslt1-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libreadline-dev libssl-dev autoconf | |
| wget https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
| chmod +x phpbrew | |
| mv phpbrew /usr/local/bin |
| var http=require("http"),https=require("https"),fs=require("fs"); | |
| var exec = require('child_process').execFile; | |
| var UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36"; | |
| //从12306获取图片 | |
| getImg().then(function(){ | |
| // 改变图片尺寸 | |
| return resizeImg(); | |
| }).then(function(){ | |
| // 把图片裁剪成8个小图片 | |
| return cropImg(); |
| #!/bin/bash | |
| # Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
| # Inspired from https://gist.github.com/faleev/3435377 | |
| # Remove any existing packages: | |
| sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
| # Get the dependencies (Ubuntu Server or headless users): | |
| sudo apt-get update |
Wensheng Wang, 10/1/11
Source: http://blog.wensheng.org/2011/10/performance-of-flask-tornado-gevent-and.html
When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:
| // Created by STRd6 | |
| // MIT License | |
| // jquery.paste_image_reader.js | |
| (function($) { | |
| var defaults; | |
| $.event.fix = (function(originalFix) { | |
| return function(event) { | |
| event = originalFix.apply(this, arguments); | |
| if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) { | |
| event.clipboardData = event.originalEvent.clipboardData; |