Skip to content

Instantly share code, notes, and snippets.

View iurev's full-sized avatar
😸
🍚

Vitalii Yulieff iurev

😸
🍚
  • Lisbon, Portugal
  • 14:39 (UTC +01:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am iurev on github.
  • I am wwjurew (https://keybase.io/wwjurew) on keybase.
  • I have a public key whose fingerprint is 5660 24FF E316 2BBF AEE8 1E3E 1C68 BA70 D0EA 9B85

To claim this, I am signing this object:

def translate(text)
text = 'Блокнот в клетку'
response = Faraday.post("https://translation.googleapis.com/language/translate/v2?key=#{ENV['GOOGLE_CLOUD_API_KEY']}") do |req|
req.headers['Content-Type'] = 'application/json'
req.body = {
q: text,
target: 'en',
}.to_json
end
select e.*
from (
select department, max(salary) as max_salary
from employee
group by department
) d
join employee e
on e.salary = d.max_salary;
FROM ubuntu
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
RUN apt-get -yqq update
@iurev
iurev / designer.html
Created July 18, 2014 08:26
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
@iurev
iurev / designer.html
Created July 18, 2014 07:46
designer
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../chart-js/chart-js.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@iurev
iurev / gist:7214019
Created October 29, 2013 12:47
Very good chunk of code for debug :)
def np(*args)
puts args
Notifier.notify(
image: '/home/wwju/logo.png',
title: 'Ruby',
message: "#{args.join(', ')}"
)
end
@iurev
iurev / gems.md
Last active December 20, 2015 16:49 — forked from Nitrino/gems.md
Исправлена опечатка

Список используемых гемов:

  1. active_admin - создание админки
  2. better_errors - заменяет стандартные ошибки Rails
  3. bullet - помогает отследить моменты где происходит N+1 запросов и нужно использовать eager loading
  4. cancan - гем для авторизации и прав пользователя
  5. the role - авторизации для 4х рельс, мне нарвится больше чем cancan
  6. client_side_validations - автоматически создаёт JavaScript валидацию на клиенте из существующих серверных валидаций. Очень классная штука. скринкаст: http://railscasts.com/episodes/263-client-side-validations
  7. devise - аутeнтификация пользователей.
  8. factory_girl - создание фабрик, замена стандартным fixtures