Skip to content

Instantly share code, notes, and snippets.

View Yegorov's full-sized avatar
🏢
Work it harder. Make it better. Do it faster.

Artem Yegorov

🏢
Work it harder. Make it better. Do it faster.
View GitHub Profile
@Yegorov
Yegorov / readme.md
Created November 10, 2022 20:05
Install rails 7 in manjaro
$ gem install websocket-driver
Building native extensions. This could take a while...
ERROR:  Error installing websocket-driver:
        ERROR: Failed to build gem native extension.

    current directory: /home/artem/.rvm/gems/ruby-3.1.2/gems/websocket-driver-0.7.5/ext/websocket-driver
/home/artem/.rvm/rubies/ruby-3.1.2/bin/ruby -I /home/artem/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0 -r ./siteconf20221110-546452-fjx5sa.rb extc
onf.rb
creating Makefile
@Yegorov
Yegorov / code-hostings.md
Last active March 23, 2024 20:51
Services to collaborate on code / Code hosting / SCM (Software Configuration Management) / RCS (Revision Control System) / CVS / SVN / Git / Mercurial
require "mini_magick"
in_name = "in.jpg"
out_name = "out.jpg"
image = MiniMagick::Image.open(in_name)
image.combine_options do |im|
im.extent image.dimensions.max
im.gravity "Center"
@Yegorov
Yegorov / ya.py
Created January 13, 2018 16:08
Download file from Yandex.Disk through share link
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# https://toster.ru/q/72866
# How to
# wget http://gist.github.com/...
# chmod +x ya.py
# ./ya.py download_url path/to/directory
import os, sys, json
@Yegorov
Yegorov / porter_stemmer.rb
Created November 29, 2017 19:51
Стеммер Портера для русского языка на Ruby
class PorterStemmer
PERFECTIVEGROUND = /((ив|ивши|ившись|ыв|ывши|ывшись)|((?<=[ая])(в|вши|вшись)))$/
REFLEXIVE = /(с[яь])$/
ADJECTIVE = /(ее|ие|ые|ое|ими|ыми|ей|ий|ый|ой|ем|им|ым|ом|его|ого|ему|ому|их|ых|ую|юю|ая|яя|ою|ею)$/
PARTICIPLE = /((ивш|ывш|ующ)|((?<=[ая])(ем|нн|вш|ющ|щ)))$/
VERB = /((ила|ыла|ена|ейте|уйте|ите|или|ыли|ей|уй|ил|ыл|им|ым|ен|ило|ыло|ено|ят|ует|уют|ит|ыт|ены|ить|ыть|ишь|ую|ю)|((?<=[ая])(ла|на|ете|йте|ли|й|л|ем|н|ло|но|ет|ют|ны|ть|ешь|нно)))$/
NOUN = /(а|ев|ов|ие|ье|е|иями|ями|ами|еи|ии|и|ией|ей|ой|ий|й|иям|ям|ием|ем|ам|ом|о|у|ах|иях|ях|ы|ь|ию|ью|ю|ия|ья|я)$/
RVRE = /^(.*?[аеиоуыэюя])(.*)$/
DERIVATIONAL = /.*[^аеиоуыэюя]+[аеиоуыэюя].*ость?$/
DER = /ость?$/
@Yegorov
Yegorov / readme.md
Last active December 22, 2018 20:54
IaaS, PaaS, BaaS, VPS (VDS), Dokker etc
@Yegorov
Yegorov / Lab5_.idea_.name
Created February 17, 2014 17:53
Java lab 5
Lab5
@Yegorov
Yegorov / Lab.c
Created October 15, 2012 18:31
Geometry Lab
#include <stdio.h>
#include <locale.h>
#include <stdlib.h>
#include <conio.h>
#include <math.h>
#include <windows.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */