This file contains 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
Passos que segui para conseguir instalar a gem mysql2, | |
pois o comando de forma tradicional gem install mysql2 não estava funcionando. | |
1) locate mysql_config | |
Não listava nada, porém tenho mysql rodando aqui com PHP. | |
2) brew install mysql | |
3) locate mysql_config | |
/Applications/MAMP/Library/bin/mysql_config |
This file contains 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
<div> | |
<%= f.label t('.name') %>: | |
<%= f.text_field :name, size: 40 %> | |
</div> | |
<div> | |
<%= f.label :password, 'Password' %>: | |
<%= f.password_field :password, size: 40 %> | |
</div> |
This file contains 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
... | |
-lpthread -lcrypt -lm /var/lib/gems/1.8/gems/passenger-3.0.9/ext/nginx/../common/libpassenger_common.a /var/lib/gems/1.8/gems/passenger-3.0.9/ext/nginx/../common/libboost_oxt.a -lstdc++ -lpthread -lpcre -lssl -lcrypto -ldl -lz | |
/usr/bin/ld: /var/lib/gems/1.8/gems/passenger-3.0.9/ext/nginx/../common/libpassenger_common.a(aggregate.o): undefined reference to symbol 'pow@@GLIBC_2.0' | |
/usr/bin/ld: note: 'pow@@GLIBC_2.0' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so so try adding it to the linker command line | |
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so: could not read symbols: Invalid operation | |
collect2: ld returned 1 exit status | |
make[1]: *** [objs/nginx] Error 1 | |
make[1]: Leaving directory `/tmp/root-passenger-26428/nginx-1.0.6' | |
make: *** [build] Error 2 |
This file contains 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
from django.contrib import admin | |
from django.contrib.localflavor.br.forms import BRZipCodeField | |
from django.forms import ModelForm | |
from app.customers.models import Customer, Contact | |
class ContactInline(admin.TabularInline): | |
model = Contact | |
extra = 2 | |
class CepForm(ModelForm): |
This file contains 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
~/workspace/django/financeiro$ ./manage.py migrate | |
Running migrations for customers: | |
- Migrating forwards to 0001_initial. | |
> customers:0001_initial | |
! Error found during real run of migration! Aborting. | |
! Since you have a database that does not support running | |
! schema-altering statements in transactions, we have had | |
! to leave it in an interim state between migrations. |
This file contains 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
# def expiration_date(self): | |
# return self.expiration_date.strftime("%d/%m/%Y") | |
# expiration_date.short_description = 'data de vencimento' | |
# | |
# def payment_date(self): | |
# return self.payment_date.strftime("%d/%m/%Y") | |
# payment_date.short_description = 'data do pagamento' | |
ou |
This file contains 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
ADOBE | |
127.0.0.1 hl2rcv.adobe.com | |
127.0.0.1 t3dns.adobe.com | |
127.0.0.1 3dns-1.adobe.com | |
127.0.0.1 3dns-2.adobe.com | |
127.0.0.1 3dns-3.adobe.com | |
127.0.0.1 3dns-4.adobe.com | |
127.0.0.1 activate.adobe.com | |
127.0.0.1 activate-sea.adobe.com | |
127.0.0.1 activate-sjc0.adobe.com |
This file contains 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
rake db:xxx RAILS_ENV=production | |
RAILS_ENV=production bundle exec rake assets:precompile |
This file contains 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
<form method="post" action="https://pagseguro.uol.com.br/v2/checkout/cart.html?action=add" target="pagseguro"> | |
<input type="hidden" value="[email protected]" name="receiverEmail"> | |
<input type="hidden" value="BRL" name="currency"> | |
<input type="hidden" value="1" name="itemQuantity"> | |
<input type="hidden" value="123" name="itemId"> <!-- ID --> | |
<input type="hidden" value="Produto XPTO" name="itemDescription"> <!-- NOME --> | |
<input type="hidden" value="400.00" name="itemAmount"> <!-- PRECO Ex: 29.99 --> |
This file contains 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
offset = rand(Banner.published.count) | |
@banner = Banner.published.first(:offset => offset) |
OlderNewer