Skip to content

Instantly share code, notes, and snippets.

View sveredyuk's full-sized avatar

Volodya Sveredyuk sveredyuk

View GitHub Profile
<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.clintondailynews.com/alert-rss-feed.xml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<channel>
<title></title>
<link>https://www.clintondailynews.com/alert-rss-feed.xml</link>
<description></description>
<language>en</language>
<atom:link href="https://www.clintondailynews.com/alert-rss-feed.xml" rel="self" type="application/rss+xml" />
<item>
<title>McGee re-sentencing</title>
<link>https://www.clintondailynews.com/news-mobile-news-news-alert/mcgee-re-sentencing</
@sveredyuk
sveredyuk / perforator.rb
Last active May 25, 2017 07:27
Simple and stupid way how to measure time of code executing
# In my current project suddenly occurs a problem.
# One of background job spent too much execution time.
# We are missed of the measurement tool at the begin, so I decide to be a hero that create this tool and
# deliver the answer to a question: "why it takes so much fu#$ing time ?!"
# After 10 minutes of coding I gave birth to this class.
# It's super simple wrapper that measures time spent on coding execution and
# also add some logging feature:
class PerformanceMeter
@sveredyuk
sveredyuk / gist:d2f3d821e08526dbce8ebf3569451aed
Created May 4, 2016 13:12 — forked from brianjlandau/gist:4162654
Setting up a Rails engine for MySQL, RSpec & Capybara

Setup RSpec and Capybara on a new Rails engine

  1. rails plugin new ENGINE_NAME --full --database=mysql

  2. Add to gemspec:

s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'shoulda-matchers'
s.add_development_dependency 'capybara'
s.add_development_dependency 'database_cleaner'
@sveredyuk
sveredyuk / digital_ocean_setup.md
Created March 11, 2016 19:53 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@sveredyuk
sveredyuk / gist:27780d4071517bb74be0
Created October 22, 2015 12:43 — forked from pahanix/gist:885671
Clear your logs in development automatically when they are too large.
# config/initializers/clear_logs.rb
# This snippet simply clears your logs when they are too large.
# Large logs mean looooong search in TextMate. You know it :)
# Every time you run rails server or rails console it checks log sizes
# and clears the logs for you if necessary.
if Rails.env.development?
MAX_LOG_SIZE = 2.megabytes