Skip to content

Instantly share code, notes, and snippets.

View AlexKVal's full-sized avatar

Alex Shemetovskiy AlexKVal

View GitHub Profile
@AlexKVal
AlexKVal / city.rb
Last active March 9, 2019 13:43 — forked from vamdt/city.rb
rails4 sti, custom "type" column name and value
class City < GeoEntity
def self.sti_name
3
end
end
#!/usr/bin/sudo ruby
#
# revealer.rb -- Deobfuscate GHE .rb files.
#
# This is simple:
# Every obfuscated file in the GHE VM contains the following code:
#
# > require "ruby_concealer.so"
# > __ruby_concealer__ "..."
@AlexKVal
AlexKVal / Gemfile
Created June 25, 2020 10:00 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@AlexKVal
AlexKVal / simplest-monad.js
Created January 21, 2022 21:40 — forked from getify/simplest-monad.js
what's the simplest monad implementation we could express in JS?
function Identity(v) {
return { val: v };
}
function chain(m,fn) {
return fn(m.val);
}
// ^^^ that's it!