Skip to content

Instantly share code, notes, and snippets.

View vladson's full-sized avatar

Vladislav Bogomolov vladson

  • London / United Kingdom
View GitHub Profile

Используя фреймворк Ruby on Rails необходимо создать веб-приложение, которое содержит следующее:

Модели:

  • Экскурсия (аттрибуты: заголовок, описание, признак публикации)
  • Категории экскурсии (n-n). Например, историческая, городская, природная, музейная и т.д.
  • Город экскурсии (1-n).

Клиентская часть:

@vladson
vladson / fullstack.md
Last active December 11, 2022 09:12
Тестовое задание для fullstack разработчика

Задание:

Сверстать и минимально реализовать макет. https://drive.google.com/file/d/0Bw-TzONjTHHmcTBkd1dONGpaaEU/view?usp=sharing

Требования к верстке:

Адаптивно, с поддержкой браузеров последней версии, но не сильно подгонять пиксель в пиксель. Проверить на 3х размераз — десктоп, планшет, смартфон.

Форма

@vladson
vladson / gist:58e735a41567d83594c7
Created March 13, 2015 15:15
JRuby java_class bug
[66] pry(#<Inventory::Product::Items::GroupProposition>)> BasicObject.java_class
BasicObject.java_class
NoMethodError: undefined method `reified_class' for nil:Java::OrgJruby::RubyNil
from /Users/vladson/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/jruby/core_ext/class.rb:95:in `java_class'
[67] pry(#<Inventory::Product::Items::GroupProposition>)>
var clicker = function(){$('[style="'+_.invert(_.countBy($('#box').children(), function(n){return $(n).attr('style')}))['1']+'"]').click();}
window.setInterval(clicker, 1);
@vladson
vladson / gist:14c4aedd650da72a706b
Created July 23, 2014 13:35
Coursera quiz computer
grades = _.map($('.course-quiz-item-score > td >span'),
function(i){
return _.map($(i).clone().children().remove().end().text().split(' / '),
function(j){return Number.parseFloat(j)});});
pos = _.reduce(grades, function(memo, i){ return memo + i[1]}, 0)
got = _.reduce(grades, function(memo, i){ return memo + i[0]}, 0)
result = got / pos
alert('You got ' + result*100 + '% till now')
@vladson
vladson / pyrc
Created July 23, 2014 11:08
pyrc
# Add auto-completion and a stored history file of commands to your Python
# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
# bound to the Esc key by default (you can change it - see readline docs).
#
# Store the file in ~/.pystartup, and set an environment variable to point
# to it: "export PYTHONSTARTUP=~/.pystartup" in bash.
import atexit
import os
import readline

Введение

Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой OS, эти термины практически везде одинаковые и здесь они изложены в понятной для начинающих форме.

http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html

Прочесть нужно треть главы до подраздела "Starting a process", если С не пугает, читайте полностью. После прочтения вы будете понимать, что такое process, thread, mutex, priorites, semaphores, scheduler, contex-switch, kernel states.

Ruby

# Ruby fizzbuzz, functional style, no conditionals whatsoever
one_if_divisible_by = lambda{|num, x| (1-((x.to_f / num) % 1).ceil)}.curry
fizz1 = one_if_divisible_by.(3)
buzz1 = one_if_divisible_by.(5)
one_to_word = lambda{|func, word, n| word * func.(n)}.curry
one_to_n_to_s = lambda{|func, n| n.to_s * func.(n)}.curry
fizz = one_to_word.(fizz1,'Fizz')
buzz = one_to_word.(buzz1,'Buzz')
@vladson
vladson / README.md
Created December 10, 2012 05:16 — forked from JakeWharton/README.md
Maven pom for Google Play services

Maven + Google Play Services

The recently released version of Google Play Services presents itself as a library project with string and attribute resources coupled with a .jar in the libs/ folder that has been compiled against internal APIs.

While this is convenient for users of IDEs or Ant, it presents a problem for those using proper build systems (e.g., Maven, Gradle) with dependency management. Inside the .jar there are a lot of classes which reference static attributes on the com.google.android.gsm.R class. This means that