Skip to content

Instantly share code, notes, and snippets.

View oiwn's full-sized avatar

Alexander oiwn

View GitHub Profile
@oiwn
oiwn / gist:8746888
Created February 1, 2014 02:00 — forked from afeld/gist:5704079

TODO: make gem for this

This was tested using Rails 3.2 and Rails 4.0 on Ruby 2.0.0.

Bower

  1. Set the install directory for Bower components:

// .bowerrc

@tornado.gen.engine
def async_request(self, callback, server_url, method=u'GET', body=None, **kwargs):
"""
Make async request to server
:param callback: callback to pass results
:type callback: func
:param server_url: path to required API
:type server_url: unicode
:param method: HTTP method to use, default - GET
:type method: unicode
# -- coding: utf-8 --
import os
import pdb
#import random
from scrapy import log, signals
from scrapy.stats import stats
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import IgnoreRequest
from scrapy.conf import settings
from scrapy.utils.job import job_dir