Very short description of the application.
Applicatoin is written in ruby language, using Ruby on Rails web framework.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FlashHelper | |
[:success, :info].each do |kind| | |
define_method "flash_#{kind}" do |options = {}| | |
msg = options[:message] || kind | |
flash_notice message: msg, kind: kind, now: options[:now] | |
end | |
end | |
def flash_error(options = {}) |
A Dashing widget to display weather information using World Weather Online API and Skycons. Live here.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: ensure required packages are installed for Java 7 | |
apt: name=$item state=latest update_cache=yes | |
with_items: | |
- python-software-properties | |
- name: Add Java repository to sources | |
action: apt_repository repo='ppa:webupd8team/java' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SpecHelper | |
def local_io(in_str) | |
old_stdin, old_stdout = $stdin, $stdout | |
$stdin = StringIO.new(in_str) | |
$stdout = StringIO.new | |
yield | |
$stdout.string | |
ensure | |
$stdin, $stdout = old_stdin, old_stdout | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script requires the following Packages | |
1: Twitter: https://pypi.python.org/pypi/twitter | |
2: PyQuery: https://pypi.python.org/pypi/pyquery | |
3: Jinja2: https://pypi.python.org/pypi/Jinja2 | |
It's fairly primitive but works. It uses a Jinja2 template to create an OPML | |
file from the RSS feeds of the websites run by the people you follow on | |
Twitter. |
Надеюсь, что теперь эта специальная олимпиада затихнет, потому что код-победитель только на ~20% уступает простой записи нулей в /dev/null.
При ближайшем рассмотрении, задача оказалась на скорость вывода в stdout, т.е. так как вход у неё довольно маленький (~10K элементов), то парсить практически всё равно как -- на любом языке из использовавшихся.
После понимания этого, задача сводится к эффективной буферизации вывода и размышлениям, почему же нигде не работает стандартная буферизация --- по идее, она должна делать именно
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.2.1 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
ENV RAILS_ENV production | |
ENV REFILE_CACHE_DIR /var/tmp/uploads | |
RUN curl -sL https://deb.nodesource.com/setup | bash - |
OlderNewer