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
#!/bin/sh | |
# size of swapfile in megabytes | |
swapsize=8000 | |
# does the swap file already exist? | |
grep -q "swapfile" /etc/fstab | |
# if not then create it | |
if [ $? -ne 0 ]; then |
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
public function actionRecreateMultires($panorama_id) | |
{ | |
/** @var PanoramaService $panoramaService */ | |
$panoramaService = \Yii::app()->panorama; | |
/** @var Panorama $panorama */ | |
$panorama = \Panorama::model()->findByPk($panorama_id); | |
$s3 = new S3(Yii::app()->s3->aKey, Yii::app()->s3->sKey); |
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
<tr> | |
<td height="150" align="center"> | |
<a href="1.html"> | |
<img src="images/1.jpg" width="100"/> | |
<br> | |
Фото №1 | |
</a> | |
<br> | |
<button value="1" name="photo">Голосовать</button> | |
</td> |
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
blablabla |
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
{ | |
"response": | |
{ | |
"uri": "\/api\/ak%40mytask.me\/sprint22-6.stage.internal.mytask.me_1", | |
"action": "ZOHO_CATALOG_INFO", | |
"result": | |
{ | |
"response":{ | |
"uri":"\/api\/ak%40mytask.me\/sprint22-6.stage.internal.mytask.me_1", | |
"action":"DATABASEMETADATA", |
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
vagrant@vagrant-ubuntu-trusty-64:~$ cat sub.py | |
from subprocess import Popen, PIPE, STDOUT | |
sub_process = Popen('ls -la', shell=True, bufsize=0) | |
while sub_process.poll() is None and sub_process.stdout is not None: | |
print sub_process.stdout.readline() | |
print "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
vagrant@local.round.me:~$ cat /etc/nginx/sites-available/dashboard.conf | |
server { | |
server_name dashboard.local.round.me; | |
set $root_path "/git/dashboard"; | |
access_log /var/log/nginx/access_dashboard.log; | |
error_log /var/log/nginx/error_dashboard.last.log info; |
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
<?php | |
/** | |
* Класс для асинхронной работы с множеством одновременных HTTP-запросов | |
* | |
* @author Sharonov Anton | |
*/ | |
class MultiHttp | |
{ | |
// значение по умолчанию для таймаута соединения | |
const CONNECTTIMEOUT = 15; |
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
/** | |
* @param $sex | |
* @return $this | |
*/ | |
public function setSex($sex) | |
{ | |
return $this->set(self::FIELD_SEX, self::getSexCode($sex)); | |
} |
NewerOlder