Skip to content

Instantly share code, notes, and snippets.

View ignasio's full-sized avatar

Ignat ignasio

  • Voronezh, Russia
View GitHub Profile
@ignasio
ignasio / gist:4ac4ba97f7d4f6e60d89dcc2a1a4120c
Last active April 27, 2023 18:01
https proxy one-liner
## old fashined option number one
#turkey vm
apt-get install socat
socat TCP-LISTEN:8080,fork,reuseaddr TCP:twitter.com:443
#russian vm
echo "turkey_vm_ip twitter.com" >> /etc/hosts
curl -D - https://twitter.com:8080
## option number two
@ignasio
ignasio / diff.rb
Created July 26, 2016 18:29
diff between two files based on lcs
class Diff
def initialize(_old,_new)
@old = _old
@new = _new
end
def results
@global_index = {}
@old.each_with_index{|v,i| @global_index[v] = i}
@new.each_with_index{|v,i| @global_index[v] = i}
@ignasio
ignasio / elasticsearch.yml
Created July 18, 2016 08:31
elasticsearch config for russian morphology based on hunspell
index:
number_of_shards: 3
number_of_replicas: 0 # not for production
analysis:
char_filter:
ru:
type: mapping
mappings: ['Ё=>Е', 'ё=>е']
analyzer:
ru_RU: