sudo apt-get update
sudo apt-get install docker.io
; this assumes docker for windows had exposed daemon to this port
export DOCKER_HOST=tcp://localhost:2375
; install docker-compose ; see https://docs.docker.com/compose/install/#install-compose
| // have this inside your Users model | |
| public function getUserType() | |
| { | |
| return $this->type == 1 ? "Administrator" : "User"; | |
| } | |
| // modify your grid as this | |
| <?php |
| add_action('add_meta_boxes', 'gov_meta_box_add'); | |
| function gov_meta_box_add() | |
| { | |
| add_meta_box('post-meta-box-id', 'Event Type', 'gov_meta_box_cb', 'post', 'side', 'high'); | |
| add_meta_box('page-meta-box-id', 'Event Type', 'gov_meta_box_cb', 'page', 'side', 'high'); | |
| } | |
| function gov_meta_box_cb($post) | |
| { | |
| $values = get_post_custom($post->ID); // error_log(json_encode($values)); |
| <?php | |
| /** | |
| * @author: [email protected] | |
| */ | |
| namespace common\components\storage; | |
| /** | |
| * A component to Store File into local storage/path. | |
| * Just add this component to your configuration providing this class, |
| function myAutocomplete ($document, $timeout, $compile) { | |
| return { | |
| restrict: 'A', | |
| scope: { | |
| onSelectModel: '=' | |
| }, | |
| template: require('./autocomplete.html'), | |
| transclude: true, | |
| link: (scope, element, attrs) => { | |
| $document.ready(() => { |
| <?php | |
| namespace common\models; | |
| use Yii; | |
| use yii\behaviors\BlameableBehavior; | |
| use yii\behaviors\TimestampBehavior; | |
| use yii\imagine\Image; | |
| /** |
| #!/bin/sh | |
| cd /tmp | |
| mkdir vpnht | |
| cd vpnht | |
| cat <<EOF > vpnht.conf | |
| client | |
| dev tun | |
| proto udp | |
| resolv-retry infinite | |
| nobind |
| version: '2' | |
| services: | |
| mysql: | |
| build: ./mysql | |
| volumes_from: | |
| - volumes_data | |
| ports: | |
| - "3306:3306" | |
| environment: |
| server { | |
| listen 80; | |
| root /var/www; | |
| index index.php index.html; | |
| proxy_read_timeout 300; | |
| client_max_body_size 1024M; | |
| location / { |
| @import '../theme/icons'; // that icons.scss above | |
| @include makeIcon(mb-orders, '\e92e'); | |
| @include makeIcon(mb-home, '\e900'); | |
| @include makeIcon(mb-account, '\e901'); |
sudo apt-get update
sudo apt-get install docker.io
; this assumes docker for windows had exposed daemon to this port
export DOCKER_HOST=tcp://localhost:2375
; install docker-compose ; see https://docs.docker.com/compose/install/#install-compose