Skip to content

Instantly share code, notes, and snippets.

View inem's full-sized avatar
🌰
In progress

Ivan Nemytchenko inem

🌰
In progress
View GitHub Profile
class Verifier
attr_accessor :object, :user
def initialize(object, user)
@object = object
@user = user
end
def access_allowed?
if @user.class == Run
@inem
inem / Error
Created April 16, 2014 03:53
Chassis failing experiment
/Projects/my/repositories-experiment > ruby app.rb
/Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/strategy.rb:83:in `included': private method `include' called for Chassis::Repo:Class (NoMethodError)
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:19:in `include'
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:19:in `<class:Repo>'
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:18:in `<module:Chassis>'
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:1:in `<top (required)>'
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis.rb:63:in `require_relative'
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis.rb:63:in `<top (required)>'
from app.rb:3:in `require'
from app.rb:3:in `<main
require 'rubygems'
require 'bundler/setup'
require 'chassis'
class Post
attr_accessor :id, :title, :text
end
repo = Chassis::Repo.default
@inem
inem / aaa.md
Created October 19, 2014 08:35
  1  2  3  4
              Expert in Ruby on Rails and working with relational database
  _  _  _  x      ● Experience working with git
  _  _  _  x      ● Usage of rabl for view building
  _  _  x  _      ● Analytics and data massaging skills, especially for massaging initial seed data sets
  _  _  _  x      ● Clear understanding of RESTful web service architecture
  _  _  x  _      ● Experience with Heroku for deployment
  _  _  _  x      ● Written web service and RESTful interfaces
  _  _  x  _      ● Understanding of distributed scalable systems for web services
@inem
inem / README.md
Last active August 29, 2015 14:18 — forked from syntagmatic/README.md

Null values indicated by space character.

def authorize_key_for_root(config, *key_paths)
[*key_paths, nil].each do |key_path|
if key_path.nil?
fail "Public key not found at following paths: #{key_paths.join(', ')}"
end
full_key_path = File.expand_path(key_path)
if File.exists?(full_key_path)
config.vm.provision 'file',
@inem
inem / COMBO17.csv
Last active August 29, 2015 14:20 — forked from syntagmatic/COMBO17.csv
We can't make this file beautiful and searchable because it's too large.
Nr,Rmag,e.Rmag,ApDRmag,mumax,Mcz,e.Mcz,MCzml,chi2red,UjMAG,e.UjMAG,BjMAG,e.BjMAG,VjMAG,e.VjMAG,usMAG,e.usMAG,gsMAG,e.gsMAG,rsMAG,e.rsMAG,UbMAG,e.UbMAG,BbMAG,e.BbMAG,VnMAG,e.VbMAG,S280MAG,e.S280MA,W420FE,e.W420FE,W462FE,e.W462FE,W485FD,e.W485FD,W518FE,e.W518FE,W571FS,e.W571FS,W604FE,e.W604FE,W646FD,e.W646FD,W696FE,e.W696FE,W753FE,e.W753FE,W815FS,e.W815FS,W856FD,e.W856FD,W914FD,e.W914FD,W914FE,e.W914FE,UFS,e.UFS,BFS,e.BFS,VFD,e.VFD,RFS,e.RFS,IFD,e.IFD
6,24.995,0.097,0.935,24.214,0.832,0.036,1.4,0.64,-17.67,0.14,-17.54,0.25,-17.76,0.25,-17.83,0.14,-17.6,0.25,-17.97,0.25,-17.76,0.14,-17.53,0.25,-17.76,0.25,-18.22,0.17,6.60E-04,3.85E-03,1.27E-02,3.72E-03,1.89E-02,4.48E-03,1.82E-02,3.55E-03,1.47E-02,3.01E-03,1.66E-02,4.09E-03,1.88E-02,5.63E-03,2.46E-02,3.51E-03,2.45E-02,5.24E-03,2.16E-02,2.66E-03,2.44E-02,5.46E-03,3.77E-02,6.10E-03,1.17E-02,1.01E-02,1.87E-02,2.39E-03,1.63E-02,1.29E-03,1.73E-02,1.41E-03,1.65E-02,4.34E-04,2.47E-02,4.83E-03
9,25.013,0.181,-0.135,25.303,0.927,0.122,0.864,0.41,-18.28,0.22,17.86,0.55,-18
| Technology/Skill | Self-assessment (1-4)*| Comments | Where used |
|----------------------------------------|-----------------------|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| - Rails 4 and Ruby 2 | 3 | Used in number of projects | https://txt2give.co, data converter for http://roomorama.com |
| - Test-driven development (Rails) | 3 | Using widely where applicable | https://txt2give.co, http://www.proteomecluster.com, data converter for http://roomorama.com |
| - Test-driven deve
# Link to local copy of edge rails
# inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
#run "rm -f public/javascripts/*"
# This is a trivial HTTP proxy server, intended for use as a troubleshooting tool
# ONLY (not for real, actual, production use). I wrote this because I couldn't find
# a simple HTTP proxy that I could use to test HTTP proxy support in Net::SSH.
#
# This code is in the public domain, so do with it what you will!
require 'socket'
server = TCPServer.new('127.0.0.1', 8080)
client = server.accept