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
PADRONIZAR TODAS AS LANG E KEYS NO SINGULAR | |
lang: flex | |
keys: as3 meta data tag event | |
url: http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html | |
[Event(name="eventName", type="package.eventType")] | |
lang: javascript | |
keys: js google ajax api lib swfobject jquery |
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
# Declaring: | |
class Post < ActiveRecord::Base | |
has_one :author | |
# bug happens only when used the code next line | |
accepts_nested_attributes_for :author | |
end | |
#Using: |
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
Rails Boot Order: | |
config.ru é executado sempre em primeiro, pelo servidor web, que é responsável por executar a aplicação, mas antes fazendo require para: | |
config/environment.rb apenas executa AppName::Application.initialize!, mas antes faz require para: | |
config/application.rb que inclui rails, as gems em Gemfile e faz configurações do rails mas antes de tudo inclui: | |
config/boot.rb que apenas inclui e configura o Bundler | |
Descrição das gems utilizadas: | |
Using rake (0.9.1) como o make do C, para executar comandos | |
Using multi_json (1.0.3) utilizar diferentes parsers atraves de uma mesma interface | |
Using activesupport (3.1.0.rc1) extensões e melhorias para tipos básicos do ruby e a linguagem em si |
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
A URL: | |
http://www.dentalpress.com.br/upload_sucesso.htm | |
vc substitui pelo endereço para onde o usuário será redirecionado após o upload estiver completado. | |
key é o nome com que o arquivo será criado no servidor. | |
${filename} significa o nome do arquivo selecionado. | |
O problema é que se dois dentistas escolherem um arquivo com mesmo nome, | |
o último irá sobrescrever o primeiro. Então o melhor é vc gerar um id para identificar o dentista, | |
por exemplo, o email dele inserido com PHP, assim: |
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
require 'fileutils' | |
$stderr.reopen("/dev/null", "w") | |
all_gems_file = 'all_gems.txt' | |
`gem list --remote > #{all_gems_file}` unless File.exists? all_gems_file | |
lines = File.readlines all_gems_file |
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
Cada engenheiro pode ter os seguintes campos: | |
NOME: | |
Setor: | |
Endereço: | |
Bairro: | |
Cidade: | |
Estado: | |
Cep: | |
Tel.: | |
Fax: |
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
sudo -s | |
echo "options ath9k nohwcrypt=1" > /etc/modprobe.d/ath9k.conf | |
cat <<'EOF' > /etc/network/if-up.d/wireless-speed | |
if [ "$IFACE" = "wlan0" ] ; then | |
iwconfig wlan0 rate 300M | |
fi | |
EOF | |
chmod 755 /etc/network/if-up.d/wireless-speed |
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
# funcao para facilitar o uso do apt-get | |
apt() { apt-get -y --force-yes --fix-missing install $*; } | |
# atualizar pacotes | |
apt-get update | |
# instalar curl e o gerenciador de versao de codigo: git | |
apt curl git-core | |
# instalar o rvm, gerenciador de instalacoes ruby |
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
<?php | |
extract($_POST); | |
var_dump($_POST); | |
exit; | |
$subject = "Contato"; | |
$html = " | |
<html> | |
<body> | |
<table width=400 border=0> |
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
Menu Vertical | |
http://jsfiddle.net/neves/wtZVY/ | |
Menu Horizontal + float | |
http://jsfiddle.net/neves/ypnLp/ | |
Menu Horizontal Inline | |
http://jsfiddle.net/neves/cRPQ2/ | |
tags HTML5 |