Skip to content

Instantly share code, notes, and snippets.

View assada's full-sized avatar
🥒
Pickle Alex

Oleksii Ilienko assada

🥒
Pickle Alex
View GitHub Profile
!  ~/n/neural-doodle   master … 
sudo pip install scipy --upgrade 4744 ms
Collecting scipy
Using cached scipy-0.17.0.tar.gz
Installing collected packages: scipy
Found existing installation: scipy 0.14.1
DEPRECATION: Uninstalling a distutils installed project (scipy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling scipy-0.14.1:
{
"collaborative": false,
"description": null,
"external_urls": {
"spotify": "http://open.spotify.com/user/perfects.nl/playlist/2HRcKJfj0yO14Vgm7gjuE6"
},
"followers": {
"href": null,
"total": 3
},
FROM phusion/baseimage:latest
MAINTAINER Alex Ilyenko <oleksii@tireconnect.ca>
ENV DEBIAN_FRONTEND noninteractive
ENV PATH /usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN apt-get update
RUN apt-get install -y beanstalkd
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
assada@localhost /v/w/r/T/docker> docker-compose run --rm node bash -c "npm install && npm run build"
npm info it worked if it ends with ok
npm info using npm@5.0.3
npm info using node@v8.1.0
npm info lifecycle tireconnect-analitics@1.0.0~preinstall: tireconnect-analitics@1.0.0
npm http fetch GET 200 https://registry.npmjs.org/css-loader 196ms
npm http fetch GET 200 https://registry.npmjs.org/style-loader 199ms
npm http fetch GET 200 https://registry.npmjs.org/extract-text-webpack-plugin 205ms
npm http fetch GET 200 https://registry.npmjs.org/file-loader 213ms
npm http fetch GET 200 https://registry.npmjs.org/multiselect 227ms
const TelegramBot = require('node-telegram-bot-api');
const request = require('request');
const token = 'TOKEN';
const bot = new TelegramBot(token, {
polling: true
});
bot.onText(/\/cat/, (msg, match) => {
var r = request.get('http://thecatapi.com/api/images/get?format=src', function(err, res, body) {
bot.sendMessage(msg.chat.id, this.uri.href);
});
const pidorScenario = [
[
'Погодите-ка, сначала нужно спасти остров!',
'<i>4 8 15 16 23 42</i>',
'108:00 <i>Успели...</i>',
'Остров спасли? Спасли. И пидора короновать не забудем.',
'Наш :lvl: это... @:username: (:first_name: :last_name:)! Ура, :lvl:!'
],
[
'Начнем наш ежедневный розыгрыш <b>#:draw:</b>!',
@assada
assada / romanToArab.php
Last active August 23, 2017 17:28
roman to arabic converter in php
<?php
function toArab(string $string) {
$r = 0;
$roman = ['M' => 1000, 'D' => 500, 'C' => 100, 'L' => 50, 'X' => 10, 'V' => 5, 'I' => 1];
$prev = 'I';
foreach(str_split(strrev($string)) as $char) {
$n = $roman[$char];
docker run -ti -p 9001:9001 toke/mosquitto
@assada
assada / FormErrorsNormalizer.php
Last active May 22, 2019 08:42
Symfony 3 Form errors Normalizer
<?php
namespace Tire\DealerApiBundle\Serialize;
use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationPath;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Validator\ConstraintViolationInterface;
/**
* Class FormErrorsSerializer
@assada
assada / test.php
Last active October 1, 2018 13:25
OpenTracingProxy POC
<?php
/**
* REQUIREMENTS:
* composer require zendframework/zend-code
* composer require ocramius/proxy-manager
*/
declare(strict_types = 1);
use ProxyManager\Factory\AccessInterceptorScopeLocalizerFactory as Factory;
use Zend\Code\Reflection\ClassReflection;