Skip to content

Instantly share code, notes, and snippets.

View binary-data's full-sized avatar

Anton Belonovich binary-data

  • Tolyatti, Russia
View GitHub Profile
<?php
class Search extends Controller {
/**
* @var Elasticsearch\Client
*/
private $client;
public function before() {
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Требования: нужна библиотека beautifulsoup4 версии не ниже 4.4.1:
# "pip install beautifulsoup4"
#
# Запуск возможен с тремя параметрами:
# -host - хост сервера, по умолчанию localhost
# -port - порт сервера, по умолчанию 8000
# -site - адрес сайта, без "http://". По умолчанию: habrahabr.ru
@binary-data
binary-data / resize.php
Created January 14, 2016 08:47
PHP resize image by width or heigth or both
<?php
/**
* Basic function for resize. It doesn't save image. To save use imagejpeg()
*/
function resize($width = null, $height = null)
{
if (!$width && !$height) {
return false;
}
<script>
jQuery("#termpopup_label").click(function(event) {
jQuery("#termpopup").show();
return false;
});
jQuery("#termpopup button, #termpopup #termpopup_close").click(function(event) {
jQuery("#termpopup").hide();
return false;
});
</script>
DAYS = 20
DEVS_COUNT = 4
QA_COUNT = 2
def run():
tasks = {
'in_progress': 0,
'testing': 0,
'rc': 0,