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
| ConfigureAccessFromUserGit () { | |
| if ! getent passwd git >/dev/null 2>&1; then | |
| adduser git | |
| su - -s /bin/bash git <<SU | |
| mkdir .ssh | |
| chmod 700 .ssh | |
| touch .ssh/authorized_keys | |
| chmod 600 .ssh/authorized_keys | |
| SU |
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
| CI_SERVER_IP=$(getent hosts "ci-server.local" | awk '{ print $1 }') | |
| InstallSonarCubeWithMysql () { | |
| set +e | |
| RESULT=`mysqlshow --user=root --password=root sonar| grep -v Wildcard | grep -o sonar` | |
| set -e | |
| if [ ! "$RESULT" == "sonar" ]; then | |
| mysql -u root -proot <<SQL | |
| CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; |
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 | |
| class CaesarCipher{ | |
| public $alphabet; | |
| public $cipher; | |
| public function encode(string str){ | |
| //реализация | |
| } | |
| } |
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
| [debug] | |
| ; Remote settings | |
| xdebug.remote_autostart=on | |
| xdebug.remote_enable=on | |
| xdebug.remote_handler=dbgp | |
| xdebug.remote_mode=req | |
| xdebug.remote_host=localhost | |
| xdebug.remote_port=9000 | |
| ; General |
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 | |
| try { | |
| if (isFormDataSubmitted()) { | |
| $clientId = getSignedInUserId(); | |
| if (!$clientId) { | |
| $clientId = apiAddClientAndGetId(); | |
| } | |
| addProductToUser($trial_version_product_id, $clientId); | |
| displaySuccessfullMessage(); | |
| } else { |
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
| Задача из учебника по ПХП: | |
| Создайте программу, которая трансформирует первое предложение во второе, и выводит результат. Оба предложения представлены ниже: | |
| A. Теперь пора всем хорошим людям прийти на помощь стране; | |
| Б. Пора теперь стране прийти на помощь всем хорошим людям. | |
| Интересно, как бы ее решили знакомые разработчики. Просьба код выкладывать на gist.github.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/sh | |
| DatabaseHost="localhost" | |
| DatabaseName=$1 | |
| DatabasePort="" | |
| DatabaseSocket="" | |
| DatabaseUsername=$2 | |
| DatabasePassword=$3 | |
| isImportCompleted() { |
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 | |
| class Exec{ | |
| var $commandLine; | |
| var $resultCode = 0; | |
| var $output = array(); | |
| public static function withCommandLine($commandLine){ | |
| return new Exec($commandLine); | |
| } |
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 | |
| /** | |
| * User: vglebov | |
| * Date: 4/22/11 | |
| * Time: 3:02 PM | |
| */ | |
| class Datasource | |
| { | |
| public $debug = false; |
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
| package com.smartjobboard.jira.plugins; | |
| import org.mortbay.jetty.HttpConnection; | |
| import org.mortbay.jetty.Request; | |
| import org.mortbay.jetty.Server; | |
| import org.mortbay.jetty.handler.AbstractHandler; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; |