sudo apt-get update
sudo apt-get install -y xvfb fluxbox x11vnc dbus libasound2 libqt4-dbus libqt4-network libqtcore4 libqtgui4 libxss1 libpython2.7 libqt4-xml libaudio2 libmng1 fontconfig liblcms1 lib32stdc++6 lib32asound2 ia32-libs libc6-i386 lib32gcc1 nano
sudo apt-get install -y python-gobject-2
// 由
yum whatprovides libstdc++.so.6
// 得出
yum install -y libstdc++-4.4.7-18.el6.i686
This file contains 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
#!/usr/bin/env python | |
# | |
# Copyright 2012 Patrick Hetu <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
This file contains 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
yum install -y libpng | |
yum install -y libjpeg | |
yum install -y openssl | |
yum install -y icu | |
yum install -y libX11 | |
yum install -y libXext | |
yum install -y libXrender | |
yum install -y xorg-x11-fonts-Type1 | |
yum install -y xorg-x11-fonts-75dpi |
This file contains 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
<?php | |
$imageStream = file_get_content('..') or curl_get_content('..'); | |
if ($info = @getimagesize('data://application/octet-stream;base64,' . base64_encode(imageStream))) { | |
var_dump($info); | |
if (isset($info['mime']) && substr($info['mime'], 0, 6) == 'image/') { | |
$suffix = substr($info['mime'], 6); | |
} | |
} |
#自定义契约服务
// 比如缓存
namespace App\Extensions;
use Illuminate\Contracts\Cache\Store;
class MongoStore implements Store
This file contains 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
#** artisan 缓存 ** | |
# public/storage 链接 | |
php artisan storage:link # storage/app/public -> public/storage | |
# storage 软链接到固定目录 | |
ln -sf ../../storage storage | |
cd php-5.3.10/ext/openssl
/usr/local/php/bin/phpize
# Cannot find config.m4.
# Make sure that you run '/usr/local/webserver/php/bin/phpize' in the top level source directory of the module
cp config0.m4 config.m4
chcp 告诉终端需要的编码
65001 utf8
936 gbk 简体中文
>
chkconfig version 1.3.49.5 - Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.
usage: chkconfig [--list] [--type <type>] [name]
chkconfig --add <name>
chkconfig --del <name>
chkconfig --override <name>
chkconfig [--level ] [--type ]
yum install -y mysql-proxy
vi /etc/mysql-proxy.cnf
# 代理服务器监听地址及端口
proxy-address = 0.0.0.0:30002
# 后端服务器地址及端口
proxy-backend-addresses = the.backend.server:3306