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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
int d = 0; | |
char ch, file_name[525]; | |
FILE *fp; | |
printf("Enter the name of file you wish to see\n"); |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |
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 Test\Bundle\Entity; | |
use Doctrine\ORM\EntityRepository; | |
/** | |
* AdvBaseRepository | |
* | |
* This class was generated by the Doctrine ORM. Add your own custom |
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 |
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
#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
#!/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
#!/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
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
# 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" |