Skip to content

Instantly share code, notes, and snippets.

View icarito's full-sized avatar
🐙

Sebastian Silva icarito

🐙
  • Amazonas Sur
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

##Create a migration
### rails g migration make_unicode_friendly
class MakeUnicodeFriendly < ActiveRecord::Migration
def change
alter_database_and_tables_charsets "utf8", "utf8_general_ci"
end
private
def alter_database_and_tables_charsets charset = default_charset, collation = default_collation
import requests
def get_data_doc_number(user, password, tipo_doc, numero_doc, format='json'):
'''
# url = 'http://py-devs.com:8888/api'
url = 'http://py-devs.com/api'
tipo_doc = 'dni' o 'ruc'
'''
url = 'http://py-devs.com/api'
# url = 'http://localhost:8000/api'