Skip to content

Instantly share code, notes, and snippets.

🍕
Pizza

Сергей abler98

🍕
Pizza
Block or report user

Report or block abler98

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@abler98
abler98 / IntString.php
Created Aug 16, 2018
Simple istr encoder/decoder
View IntString.php
<?php
class IntString
{
/**
* Набор символов для кодирования
*/
const CHARSET = '0-9a-zA-Z_-';
/**
@abler98
abler98 / ubuntu-php7.2-zts-pthreads
Created Oct 12, 2017 — forked from 0xfff/ubuntu-php7.2-zts-pthreads
Installing php-zts on ubuntu 16.04
View ubuntu-php7.2-zts-pthreads
#####################################################################################
# INSTALL isolated PHP 7.2 ZTS (Thread-safe) with pthreads on Ubuntu 14.04 &16.04 ###
#####################################################################################
0) Possible dependencies
sudo apt-get install libxml2-dev
1) Install necessary bison version
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb
@abler98
abler98 / ngram-search.sh
Created Aug 4, 2017 — forked from avar/ngram-search.sh
ElasticSearch fuzzy ngram powered search
View ngram-search.sh
export http_proxy=
export https_proxy=
curl -XDELETE 'http://localhost:9200/test/'
echo "Creating the mapping"
curl -XPUT 'http://localhost:9200/test/?pretty=1' -d '
{
"mappings" : {
"member" : {
@abler98
abler98 / movie-titles.rb
Created Aug 3, 2017 — forked from karmi/movie-titles.rb
Multiple analyzers and query fields in Elasticsearch for auto-completion
View movie-titles.rb
require 'tire'
# Tire.configure { logger STDERR, level: 'debug' }
Tire.index('movie-titles') do
delete
create \
settings: {
index: {
analysis: {
@abler98
abler98 / vk-audio-downloader.js
Last active Sep 25, 2019
Скрипт для скачивания музыки VK
View vk-audio-downloader.js
/*
Инструкция по использованию:
- заходим в раздел с аудиозаписями
- листаем в самый низ (чтобы прогрузились все аудиозаписи)
- открываем консоль браузера (F12 -> Консоль)
- вставляем код и нажимаем ENTER
- скачивание началось...
- браузер может потребовать разрешение на сохранение файлов, необходимо подтвердить действие
@abler98
abler98 / AbstractPresenter.php
Created Jan 13, 2017 — forked from Ellrion/AbstractPresenter.php
Презентеры в Laravel.
View AbstractPresenter.php
<?php
namespace App\Presenters;
abstract class AbstractPresenter
{
/**
* The resource that is the object that was decorated.
*
* @var mixed
View hex2rgb.php
<?php
function hex2rgb($color = '#fff')
{
$color = ltrim($color, '#');
$length = strlen($color);
if (preg_match('/[^0-9a-f]/i', $color) or $length <> 3 && $length <> 6) {
throw new Exception('Invalid color format');
}
View Laravel\app\Models\Photo.php
<?php
namespace App\Models;
use Illuminate\Http\Exception\HttpResponseException;
use Illuminate\Http\UploadedFile;
use Intervention\Image\Constraint;
use Intervention\Image\Exception\NotWritableException;
class Photo extends \Eloquent
@abler98
abler98 / queued-upload-requests.js
Created Nov 22, 2016
Uploading files to server with queues
View queued-upload-requests.js
/*
* Загружает файл на сервер
*/
var requestQueue = [],
sendingRequest = false;
window.attachRequestToQueue = (queue) => {
requestQueue.push(queue);
doRequestQueue();
View csgo.life-bot.js
/**
* Бот для csgo.life
*/
console.log('Запуск бота...');
// var io = io(config.host);
var io = SOCKET;
const TYPE_HELLO = "hello";
You can’t perform that action at this time.