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
package main | |
import ( | |
"bytes" | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/tls" | |
"crypto/x509" | |
"crypto/x509/pkix" | |
"encoding/base64" |
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
// From sources for https://watermill.io/docs/getting-started/ | |
package main | |
import ( | |
"context" | |
"log" | |
"time" | |
"github.com/ThreeDotsLabs/watermill" | |
"github.com/ThreeDotsLabs/watermill-amqp/pkg/amqp" |
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
package resource | |
import ( | |
"encoding/base64" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/url" | |
"os" | |
"os/exec" |
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
version: '3.4' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 | |
kafka: | |
image: confluentinc/cp-kafka:latest | |
depends_on: |
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
version: '3.6' | |
services: | |
nginx: | |
restart: always | |
build: docker/nginx | |
ports: | |
- 80:80 | |
volumes: | |
- webapp:/var/www/app | |
links: |
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 bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
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
language: go | |
go: | |
- 1.8.x | |
services: | |
- rabbitmq | |
env: | |
- AMQP_URL=amqp://guest:[email protected]:5672/ | |
install: | |
- go get -u github.com/golang/dep/cmd/dep | |
- dep ensure |
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
use yii\helpers\Html; | |
/* @var $this yii\web\View */ | |
/* @var $code int */ | |
/* @var $name string */ | |
/* @var $message string */ | |
/* @var $exception Exception */ | |
$this->title = 'Нет доступа'; | |
$this->params['breadcrumbs'][] = $this->title; |
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
class Account::ApplicationsController < Account::ApplicationController | |
expose :applications, ->{ current_user.applications } | |
expose :application, ancestor: :current_user | |
def create | |
if application.save | |
redirect_to account_application_path(application) | |
else | |
render :new | |
end |
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
package main | |
import ( | |
"project7/models" | |
"project7/controllers" | |
) | |
func main() { | |
// create article model | |
artcl := models.CreateArticle("New article") |
NewerOlder