Skip to content

Instantly share code, notes, and snippets.

View zeromodule's full-sized avatar
🤖

zeromodule

🤖
  • Belgrade
  • 13:35 (UTC +03:00)
View GitHub Profile
#!/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
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);
<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>
{
"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",
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"
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;
<?php
/**
* Класс для асинхронной работы с множеством одновременных HTTP-запросов
*
* @author Sharonov Anton
*/
class MultiHttp
{
// значение по умолчанию для таймаута соединения
const CONNECTTIMEOUT = 15;
/**
* @param $sex
* @return $this
*/
public function setSex($sex)
{
return $this->set(self::FIELD_SEX, self::getSexCode($sex));
}