Skip to content

Instantly share code, notes, and snippets.

View IskanderHaziev's full-sized avatar

Iskander Haziev IskanderHaziev

View GitHub Profile
Post.fetch # fetch post from remote resources and save to the Post
Post::Tumblr.fetch # fetch post from Tumblr and save to the Post
require 'hoptoad_notifier/capistrano'
require 'capistrano/ext/multistage'
set :stages, %w(testing staging production)
set :default_stage, 'staging'
set :use_sudo, false
default_run_options[:pty] = true
set :scm, :git
set :repository, "git@github.com:Turn2Live/turn2live.git"
# ------------------- script
#!/bin/sh
key=$(git config ssh.key)
if [ -z "$key" ]; then
git_opts=""
else
git_opts="-i ${key}"
fi
Feature: Facebook authorization
In order to moodrate my favourite artists
As a user
I want to run Moodfish application on facebook page
Scenario: Application is running on a facebook
Given I am authorized facebook user
And I don't have moodfish application on my page
When I go to page apps.facebook.com/Moodfish
And I click "Allow"
1)
Scenario Outline: Crawler slave monitoring
Given a crawler master request for a crawler slave's status
When the crawler slave returns the <slave status>
Then the crawler master should <action>
2)
Scenario Outline: Crawler slave monitoring
Given the crawler slave has status <slave status>
When a crawler master request for a crawler slave's status
Then the crawler master should <action>
@IskanderHaziev
IskanderHaziev / gist:774711
Created January 11, 2011 16:58
parsing cloudfront logs
require 'rubygems'
require 'zlib'
require 'aws/s3'
def parse_cloudfront_line(line)
return if line.strip.match(/^#/)
bytes = line.split("\t")[5]
filename = line.split("\t")[13]
info = {:file => filename, :bytes => bytes}
info if filename.strip != '-'