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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/* | |
O COUNT() primeiro carrega toda a collection e depois conta quantos itens tem. Por isso dependendo da situação, não é melhor opção a se usar para saber se tem registros. | |
Arquivo: lib/Varien/Data/Collection.php | |
public function count() | |
{ | |
$this->load(); | |
return count($this->_items); | |
} |
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
#!/bin/bash | |
# Downsamples all retina [email protected] images. | |
echo "Downsampling retina images..." | |
dir=$(pwd) | |
find "$dir" -name "*@2x.png" | while read image; do | |
outfile=$(dirname "$image")/$(basename "$image" @2x.png).png | |
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
<select name="estado"> | |
<option selected="" value="">Selecione o Estado (UF)</option> | |
<option value="Acre">Acre</option> | |
<option value="Alagoas">Alagoas</option> | |
<option value="Amapá">Amapá</option> | |
<option value="Amazonas">Amazonas</option> | |
<option value="Bahia">Bahia</option> | |
<option value="Ceará">Ceará</option> | |
<option value="Distrito Federal">Distrito Federal</option> | |
<option value="Espírito Santo">Espírito Santo</option> |
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `customer_address_entity`; | |
TRUNCATE TABLE `customer_address_entity_datetime`; | |
TRUNCATE TABLE `customer_address_entity_decimal`; | |
TRUNCATE TABLE `customer_address_entity_int`; | |
TRUNCATE TABLE `customer_address_entity_text`; | |
TRUNCATE TABLE `customer_address_entity_varchar`; | |
TRUNCATE TABLE `customer_entity`; | |
TRUNCATE TABLE `customer_entity_datetime`; |
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_category_entity`; | |
TRUNCATE TABLE `catalog_category_entity_datetime`; | |
TRUNCATE TABLE `catalog_category_entity_decimal`; | |
TRUNCATE TABLE `catalog_category_entity_int`; | |
TRUNCATE TABLE `catalog_category_entity_text`; | |
TRUNCATE TABLE `catalog_category_entity_varchar`; | |
TRUNCATE TABLE `catalog_category_product`; | |
TRUNCATE TABLE `catalog_category_product_index`; |
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_product_bundle_option`; | |
TRUNCATE TABLE `catalog_product_bundle_option_value`; | |
TRUNCATE TABLE `catalog_product_bundle_selection`; | |
TRUNCATE TABLE `catalog_product_entity_datetime`; | |
TRUNCATE TABLE `catalog_product_entity_decimal`; | |
TRUNCATE TABLE `catalog_product_entity_gallery`; | |
TRUNCATE TABLE `catalog_product_entity_int`; | |
TRUNCATE TABLE `catalog_product_entity_media_gallery`; |
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
1|Acrelândia | |
1|Assis Brasil | |
1|Brasiléia | |
1|Bujari | |
1|Capixaba | |
1|Cruzeiro do Sul | |
1|Epitaciolândia | |
1|Feijó | |
1|Jordão | |
1|Mâncio Lima |
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
AC|Acre | |
AL|Alagoas | |
AP|Amapá | |
AM|Amazonas | |
BA|Bahia | |
CE|Ceará | |
DF|Distrito Federal | |
ES|Espírito Santo | |
GO|Goiás | |
MA|Maranhão |
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 CMS alternatives | |
====================== | |
Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then. | |
Active projects: | |
--------------- | |
adva-cms | |
repo: http://github.com/svenfuchs/adva_cms/ | |
site: http://adva-cms.org/ | |
Last update: 11/24/09 |
NewerOlder