Я наелся мухоморов,
Я валяюсь под забором,
Вот бы мне еще напиться,
Завтра перестану бриться.
Вот он сашка собутыльник,
Мы откроем холодильник,
Выпьем мы бутылку нашу,
Завтра поджигаем башню.
This file contains hidden or 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
| # resource :users | |
| # resources :users | |
| api_users POST /api/users(.:format) api/v1/users#create {:format=>"json"} | |
| new_api_users GET /api/users/new(.:format) api/v1/users#new {:format=>"json"} | |
| edit_api_users GET /api/users/edit(.:format) api/v1/users#edit {:format=>"json"} | |
| GET /api/users(.:format) ap |
This file contains hidden or 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
| curl 'https://meduza.io/embed/2gis-game/api/v1/tests/2' -H 'origin: https://meduza.io' -H 'accept-encoding: gzip, deflate' -H 'accept-language: ru,en-US;q=0.8,en;q=0.6,de;q=0.4,tr;q=0.2' -H 'cookie: __gfp_64b=nB8cPBhFD7caKjcM.0pFPdZihQdvN9.2QRXHsHxWpAT.k7; _wilma_key=g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAsdjBsRmdqUGViVzNLVVNwenlqZmYyOTlWZFlqWDJpeHlnYXhma3ZtaE11ST0=--N7Moriag9UjNC+Wu/7+m4RCaqoU=; _ym_uid=1446471422169558001; _qa_key=g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYNlN0TWw2aDJLSEFTVHJJN3lGcGdhdz09--QqiO7heyvAgWF6V92vJdphOY6m0=; __io=4a5abd300.c69cdc2d0_1447431879845; __io_p=%D0%9D%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8%20%E2%80%94%20Meduza|||direct; __io_fs=website; _io_u=1; __io_sp=/news/2016/03/01/na-shahte-severnaya-proizoshel-novyy-vzryv; _ym_isad=1; _io_un=7; __io_utm=source:facebook.com|||medium:share_fb|||campaign:share; _ain_uid=1459428656277.710688347.9940269; __io_uid_test=5; __io_lv=1460032001127; _ga=GA1.2.539556269.1431811831; crtg_rta=; _ga=GA1.1.539556269.1431811831' -H 'pragma: no-cache' -H 'x-com |
This file contains hidden or 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
| 'use strict'; | |
| import AppDispatcher from '../dispatcher/AppDispatcher'; | |
| import AuthConstants from '../constants/AuthConstants'; | |
| import AuthRepository from '../repositories/AuthRepository'; | |
| import SignUpValidator from '../validators/SignUpValidator'; | |
| var actions = { | |
| signUp (options) { | |
| AppDispatcher.dispatch({ actionType: AuthConstants.AUTH_LOADING }); |
This file contains hidden or 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
| require 'stackprof' | |
| StackProf.run(mode: :wall, out: 'out.dump') do | |
| require 'sprockets' | |
| end | |
| system 'stackprof out.dump' |
This file contains hidden or 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
| require 'net/http' | |
| require 'uri' | |
| return p "wrong arguments" if ARGV.length < 2 | |
| url = ARGV[0] | |
| dest_path = ARGV[1] | |
| html = Net::HTTP.get(URI(url)); | |
| html.scan(/<img.*?src.*?['|"](http.*?)['|"]/).each do |match| | |
| img_url = URI(match[0]) |
This file contains hidden or 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
| program_name = "interactive-2.1.1" | |
| matches = program_name.match(/(.*)-(\d+)\.(\d+)\.(\d+)/) | |
| name, major, minor, tiny = matches[1..-1] |
This file contains hidden or 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
| gem 'kaminari' | |
| gem 'ransack' |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'fileutils' | |
| require 'optparse' | |
| options = {} | |
| OptionParser.new do |opts| | |
| opts.banner = "Usage: #{__FILE__} -r REGEXP START_PATH" | |
| opts.on("-r", "Pattern") do |v| |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'fileutils' | |
| require 'optparse' | |
| options = {} | |
| OptionParser.new do |opts| | |
| opts.banner = "Usage: #{__FILE__} [options] START_PATH" | |
| opts.on("-r", "--hide-repository", "Do not show repository name") do |v| |