Skip to content

Instantly share code, notes, and snippets.

View yii2-developer's full-sized avatar

Александр yii2-developer

View GitHub Profile
id newuser
usermod -aG vboxsf newuser
#!/bin/bash
set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BASE_DIR=/var/www/html
SUDO_USER='sudo -u site -H'
GIT="$SUDO_USER /usr/bin/git"
cd $BASE_DIR
$GIT fetch --all
$GIT reset --hard origin/master
#!/bin/bash
set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BASE_DIR=/var/www/yiiframework
GIT='/usr/bin/git'
cd $BASE_DIR
$GIT pull
#!/bin/bash
set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BASE_DIR=/var/www/yiiframework
SUDO_USER='sudo -u www-data -H'
GIT="$SUDO_USER /usr/bin/git"
cd $BASE_DIR
$GIT pull
<?php
namespace components\routes;
use yii\web\UrlRule;
use \app\models\Content;
use Yii;
/**
* @author Rom <rommcr@gmail.com>
@yii2-developer
yii2-developer / phantomjs
Created September 28, 2015 08:31
Phantomjs startup script for Centos
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Script for starting phantomjs.
#
. /etc/rc.d/init.d/functions
USER="phantomjs"