Skip to content

Instantly share code, notes, and snippets.

Timur Ramazanov charlie-wasp

Block or report user

Report or block charlie-wasp

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
@charlie-wasp
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
View keybase.md

Keybase proof

I hereby claim:

  • I am charlie-wasp on github.
  • I am charlie_wasp (https://keybase.io/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/config.ru
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
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
charlie-wasp / ssh-tunnel.sh
Last active Sep 14, 2015
Open SSH tunnel bash command
View ssh-tunnel.sh
#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>
#Example
ssh -L 5555:100.100.100.100:80 -p 22 -l root -N 100.100.100.100
# Now go to localhost:5555 and you'll see 192.168.108.52:80 actually
You can’t perform that action at this time.