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
[{"name":"Bears","color":"Blue","position":{"x":177,"y":85},"modelclass":"Bear","increment":false,"timestamp":false,"softdelete":false,"column":[{"colid":"c217","name":"id","type":"increments","length":"0","order":0,"defaultvalue":"","enumvalue":""},{"colid":"c218","name":"name","type":"string","length":"200","order":1,"defaultvalue":"","enumvalue":""},{"colid":"c219","name":"danger_level","type":"string","length":"200","order":2,"defaultvalue":"","enumvalue":""}],"relation":[{"extramethods":"","foreignkeys":"","name":"fish","relatedmodel":"Fish","relationtype":"hasOne","usenamespace":""},{"extramethods":"","foreignkeys":"","name":"trees","relatedmodel":"Trees","relationtype":"hasMany","usenamespace":""},{"extramethods":"","foreignkeys":"bear_id, picnic_id","name":"picnics","relatedmodel":"Picnics","relationtype":"belongsToMany","usenamespace":""}],"seeding":[]},{"name":"Fish","color":"Yellow","position":{"x":1063,"y":14},"modelclass":"Fish","increment":false,"timestamp":false,"softdelete":false,"column":[{"c |
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
jQuery(document).bind('gform_post_render', function(e, formID){ | |
jQuery('.gform_wrapper select').chosen({width:'100%'}); | |
}); |
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 | |
$path = 'path/to/files'; | |
// load up the path and look for xml file | |
$path = DRUPAL_ROOT . DIRECTORY_SEPARATOR . $path; | |
$xml_files = glob($path ."/*.xml"); | |
if(empty($xml_files)){ | |
print '<error>' . t('Nothing to import') . '</error>'; |
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 | |
shell_exec( 'cd /path/to/repo && git reset --hard HEAD && git pull' ); | |
echo "done"; |
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 | |
function mymodule_scheduler_api($node, $action) { | |
if ($action == 'publish') { | |
//if publish something with the scheduler run this rules component | |
rules_invoke_component('custom_component_name'); | |
// You can also pass args to the component like this: | |
// rules_invoke_component('custom_component_name', $node); | |
} | |
} |
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 | |
function wordpress_replace_year(){ | |
global $wpdb; | |
$args = array( | |
'post_type' => array('post', 'page'), | |
'posts_per_page' => -1 | |
); |
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 | |
function wordpress_update_order(){ | |
global $wpdb; | |
$args = array( | |
'post_type' => 'stories', | |
'order' => 'ASC', | |
'orderby' => 'post_date', | |
'posts_per_page' => -1 |
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
PASO A PRODUCCION | |
================= | |
Para realizar el paso a producción se deben considerar los siguientes ítems: | |
1.- Generación de llaves "publica.pem" y "privada.pem" | |
Las llaves deben ser generadas por el comercio con su propio generador de llaves o con el generador "genkey.exe" enviado por Transbank. |
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 | |
$skus = Db_DbHelper::scalar("SELECT GROUP_CONCAT(sku SEPARATOR ',') FROM shop_option_matrix_records WHERE product_id=:id", array('id' => $product->id)); | |
$skus = explode(',', $skus); | |
foreach($skus as $sku){ | |
echo $sku; | |
} | |
?> |
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
UPDATE postcodes SET state = 'NSW' WHERE postcode > 999 AND postcode < 3000; | |
UPDATE postcodes SET state = 'VIC' WHERE postcode > 2999 AND postcode < 4000; | |
UPDATE postcodes SET state = 'QLD' WHERE postcode > 3999 AND postcode < 5000; | |
UPDATE postcodes SET state = 'SA' WHERE postcode > 4999 AND postcode < 6000; | |
UPDATE postcodes SET state = 'WA' WHERE postcode > 5999 AND postcode < 7000; | |
UPDATE postcodes SET state = 'TAS' WHERE postcode > 6999 AND postcode < 8000; | |
UPDATE postcodes SET state = 'VIC' WHERE postcode > 7999 AND postcode < 9000; | |
UPDATE postcodes SET state = 'NT' WHERE postcode > 0 AND postcode < 1000; | |
UPDATE postcodes SET state = 'ACT' WHERE postcode > 2600 AND postcode < 2618; | |
UPDATE postcodes SET state = 'ACT' WHERE postcode > 2899 AND postcode < 3000; |