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
show table status from hi_db_schema where name = 'optlog1'; |
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
drop table if exists optlog1; | |
CREATE TABLE `optlog1` ( | |
`object` varchar(255) DEFAULT NULL, | |
`objectId` int(11) DEFAULT NULL, | |
`action` varchar(255) DEFAULT NULL, | |
`log` varchar(255) DEFAULT NULL, | |
`cabinet` varchar(255) DEFAULT NULL, | |
`org` int(11) DEFAULT NULL, | |
`uid` varchar(255) DEFAULT NULL, |
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
SELECT | |
CONCAT(FORMAT(DAT/POWER(1024,pw1),2),' ',SUBSTR(units,pw1*2+1,2)) DATSIZE, | |
CONCAT(FORMAT(NDX/POWER(1024,pw2),2),' ',SUBSTR(units,pw2*2+1,2)) NDXSIZE, | |
CONCAT(FORMAT(TBL/POWER(1024,pw3),2),' ',SUBSTR(units,pw3*2+1,2)) TBLSIZE | |
FROM | |
( | |
SELECT DAT,NDX,TBL,IF(px>4,4,px) pw1,IF(py>4,4,py) pw2,IF(pz>4,4,pz) pw3 | |
FROM | |
( | |
SELECT data_length DAT,index_length NDX,data_length+index_length TBL, |
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
# bind localhost's 5858 to remote machine 5858 | |
ssh -L 5858:127.0.0.1:5858 [email protected] | |
# bind localhost's 8090 to remote machine 8090 | |
ssh -D 127.0.0.1:8090 [email protected] | |
# run command as anthoer user | |
su - root -c "ls -l /root" |
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
README.MD | |
cd $project_home | |
# 产生新的bundle | |
php app/console generate:bundle --namespace=Tranz/BMAUserOrderBundle --dir=src --format=yml --no-interaction | |
# 从数据库中获取定义 | |
php app/console doctrine:mapping:import --force --filter="AdvUserOrder" TranzBMAUserOrderBundle yml | |
# 产生AdvUserOrder Entity | |
php app/console doctrine:mapping:convert --filter="AdvUserOrder" --force annotation ./src | |
# 产生getter 和setter . 这个命令在 使用ln -s的文件夹中没有作用? | |
php app/console doctrine:generate:entities --path="src/Tranz/BMAUserOrderBundle/Entity/AdvUserOrder" TranzBMAUserOrderBundle |
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
#!/bin/bash | |
# For detail introduction, please see http://www.jamescoyle.net/how-to/963-set-up-linux-pptp-client-from-the-terminal | |
# exit when error occur | |
set -o errexit | |
set -o nounset | |
# Bash will remember & return the highest exitcode in a chain of pipes. | |
# This way you can catch the error in case mysqldump fails in `mysqldump |gzip` | |
set -o pipefail | |
domain='yourdomain.com' |
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
#!/bin/bash | |
id=$(ps axw | grep "[ /]pppd call $1" | awk '{print $1}') | |
if [[ -z $id ]]; | |
then | |
echo 'no connection' >> /var/log/pptp/retry | |
sudo pon yourdomainname | |
else | |
echo 'yes' | |
fi |
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
#README.MD | |
cd $project_home | |
# 产生新的bundle | |
bin/console generate:bundle --namespace=Tranz/BMAUserOrderBundle --dir=src --format=yml --no-interaction | |
# 从数据库中获取定义, 产生Resources/config/doctrine/AdvUserOrder.orm.yml | |
bin/console doctrine:mapping:import --force --filter="AdvUserOrder" TranzBMAUserOrderBundle yml | |
# 产生AdvUserOrder Entity, 产生Entity/AdvUserOrder.php | |
bin/console doctrine:mapping:convert --filter="AdvUserOrder" --force annotation ./src | |
# 产生entity 中的getter 和setter . 这个命令在 使用ln -s的文件夹中没有作用? | |
bin/console doctrine:generate:entities --path="src/Tranz/BMAUserOrderBundle/Entity/AdvUserOrder" TranzBMAUserOrderBundle |
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
<?php | |
namespace $ns\\$bundle\Entity; | |
use Doctrine\ORM\EntityRepository; | |
use $ns\\$bundle\Entity\AdvBaseRepository; | |
/** | |
* ${entity}Repository | |
* |
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
#!/bin/bash | |
##Usage : path to the entities folder | |
path=$1 | |
for fs in $(ls $path/*.php | grep Repository -v | grep Base -v) ; | |
do | |
ns=Tranz | |
#bundle=BMAPromotionBundle | |
bundle=$2 |