Skip to content

Instantly share code, notes, and snippets.


Timur Ramazanov charlie-wasp

  • Saint-Petersburg, Russia
View GitHub Profile
charlie-wasp / obfuscated_id.rb
Created Aug 15, 2018
Obfuscated ID generator
View obfuscated_id.rb
module ObfuscatedId
extend ActiveSupport::Concern
# Constants used to obfuscate identifiers with formula id * multipier % modulo
# modulo and multiplier must be coprime numbers to avoid collisions
# modulo must be larger than maximum value of id
MODULO = Rails.application.secrets.id_obfuscation[:modulo]
EXPONENT = Rails.application.secrets.id_obfuscation[:exponent]
# Should contain digits and letters common for latin and cyrillic alphabets
# "12345679AEKMHPCTYX".split('').shuffle.join

Keybase proof

I hereby claim:

  • I am charlie-wasp on github.
  • I am charlie_wasp ( on keybase.
  • I have a public key ASDITkQGEvumrpuLf6ZzLbik6aseXN3hUYKEepGGjAamPQo

To claim this, I am signing this object:

View gist:8b041aa0b34fb97e2ed22a82d69bc9ca
Boot Error
Something went wrong while loading /app/
JSON::ParserError: 743: unexpected token at 'Cannot GET /webpack_manifest.json '
/app/vendor/bundle/ruby/2.3.0/gems/json-2.0.3/lib/json/common.rb:156:in `parse'
/app/vendor/bundle/ruby/2.3.0/gems/json-2.0.3/lib/json/common.rb:156:in `parse'
/app/vendor/cache/hanami-webpack-1019f8efc217/lib/hanami_webpack/manifest.rb:38:in `remote_manifest'
/app/vendor/cache/hanami-webpack-1019f8efc217/lib/hanami_webpack/manifest.rb:56:in `manifest'
charlie-wasp / .vimrc
Created Feb 21, 2016
My main .vimrc file
View .vimrc
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-surround'
Plugin 'kchmck/vim-coffee-script'
charlie-wasp /
Last active Sep 14, 2015
Open SSH tunnel bash command
#ssh -L <local_machine_port>:<remote_machine_ip>:<remote_machine_port> -p <remote_machine_ssh_port> -l <remote_machine_ssh_user> -N <remote_machine_ip>
ssh -L 5555: -p 22 -l root -N
# Now go to localhost:5555 and you'll see actually