Skip to content

Instantly share code, notes, and snippets.

View bpteam's full-sized avatar
:shipit:
ship it

Evgeny Pynykh bpteam

:shipit:
ship it
View GitHub Profile
@bpteam
bpteam / db.sql
Last active August 29, 2015 13:56
Вешается на rss и парсит на наличие ключевых слов в описании проекта и титульника сайт Free-lance.ru
CREATE TABLE `flboost` (
`id` int(11) NOT NULL,
`title` text,
`description` text,
`date` int(11) DEFAULT NULL,
`category` varchar(255) DEFAULT NULL,
`url` text,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@bpteam
bpteam / add_custom_search
Created September 19, 2014 14:36
add custom search to browser
@bpteam
bpteam / Turn on php profiler xDebug
Last active August 29, 2015 14:06
Turn on php profiler xDebug from browser bookmark
start profiler
@bpteam
bpteam / gist:d35fab891678b6694069
Created February 2, 2015 08:49
sikuli sinoptik test
try:
firefox = 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'
url = 'https://sinoptik.ua'
openApp(firefox)
if bool(exists("1422816842381.png",4)) != True:
raise Exception('Can`t run browser')
click("1422818832742.png")
type(url + Key.ENTER)
if bool(exists(Pattern("1422821974735.png").similar(0.95),50)) != True:
raise Exception('Can`t load page ' + url)
function linksSameLevel(tree){
if(isTree(tree->right)){
linksSameLevel(tree->right,tree)
}
if(isTree(tree->right) && isTree(tree->left)){
tree->left->level = &tree->right
} elseif(isTree(tree->left)) {
linksSameLevel(tree->left,tree)
}
if(isTree(tree->left)){
<?php
/**
* Created by PhpStorm.
* User: EC
* Date: 19.11.13
* Time: 22:01
* Project: free-notify
* @author: Evgeny Pynykh bpteam22@gmail.com
*/
ini_set('display_errors',1);
#!/bin/sh
#dropbox service
DBU='user_name' #Ваш пользователь в системе под которым будет работать DropBox
DAEMON='/path/to/.dropbox-dist/dropboxd' #адрес к исполняемому файлу
HOMEDIR='/home/'$DBU'/Dropbox' #Папка для синхронизации
start() {
@bpteam
bpteam / gist:653b1b0531a5bc46a6e4
Last active August 29, 2015 14:22
demo phpORC
<?php
require_once __DIR__ . '/bootstrap.php';
use bpteam\phpOCR\Recognizer;
use bpteam\phpOCR\Img;
$file_name = __DIR__ . '/template/test_img/olx1.png';
$ex = 'png';
Recognizer::setInfelicity(10);
$img = Recognizer::openImg($file_name);
//Source image
@bpteam
bpteam / not_gc.php
Created October 8, 2015 17:32
die without gc
<?php
var_dump(gc_enabled());
gc_disable();
var_dump(gc_enabled());
class Demo
{
function __construct()
{
echo "constructor\n";
}
@bpteam
bpteam / Dockerfile
Last active November 8, 2015 15:51
My php-fpm-dev dockerfile
#Dir for extensions config /usr/local/etc/php/conf.d/
FROM php:5.6-fpm
RUN apt-get update
RUN apt-get install -y php5-dev php-pear php5-common
# curl уже входит в образ 5.6-fpm но на всякие пожарные попробуем установить
RUN apt-get install -y curl libcurl4-openssl-dev
RUN docker-php-ext-install curl