I hereby claim:
- I am ajankovic on github.
- I am ajankovic (https://keybase.io/ajankovic) on keybase.
- I have a public key ASAx4H-Wj6YI2GAyDXhBaoD7kr-qNIYspcAmvN2k8Wws9Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
set-option -g default-shell /bin/zsh | |
set -g default-terminal "screen-256color" | |
set-option -sg escape-time 10 | |
set-option -g focus-events on | |
unbind r | |
bind r source-file ~/.tmux.conf |
WITH models AS ( | |
WITH data AS ( | |
SELECT | |
replace(initcap(table_name::text), '_', '') table_name, | |
replace(initcap(column_name::text), '_', '') column_name, | |
CASE data_type | |
WHEN 'timestamp without time zone' THEN 'time.Time' | |
WHEN 'timestamp with time zone' THEN 'time.Time' | |
WHEN 'boolean' THEN 'bool' | |
-- add your own type converters as needed or it will default to 'string' |
log_customer | |
log_visitor | |
log_visitor_info | |
log_url | |
log_url_info | |
log_quote | |
report_viewed_product_index | |
report_compared_product_index | |
report_event | |
catalog_compare_item |
<?php | |
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection); | |
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection); | |
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection); | |
$collection->addAttributeToFilter('is_saleable', TRUE); |
// I want to see errors | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
// Modify the PHP Environment | |
ini_set('memory_limit', '2048M'); | |
// Load Up Magento Core | |
define('MAGENTO', realpath('..')); | |
require_once(MAGENTO . '/app/Mage.php'); |
$product = Mage::getModel('catalog/product') | |
->setStoreId($store->getId()) | |
->load($product->getId()); | |
$gallery = $product->getMediaGallery(); | |
$mediaAttribute = array('image', 'small_image', 'thumbnail'); | |
if($gallery && count($gallery['images'])) { | |
$product_attributes = $product->getTypeInstance()->getSetAttributes(); | |
$gal_backend = $product_attributes['media_gallery']->getBackend(); |
" General "{{{ | |
set encoding=UTF-8 | |
set nocompatible " be iMproved | |
set history=256 " Number of things to remember in history. | |
set timeoutlen=250 " Time to wait after ESC (default causes an annoying delay) | |
set clipboard+=unnamed " Yanks go on clipboard instead. | |
set pastetoggle=<F10> " toggle between paste and normal: for 'safer' pasting from keyboard | |
set shiftround " round indent to multiple of 'shiftwidth' | |
set tags=./tags;$HOME " walk directory tree upto $HOME looking for tags |
update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, 'find this string', 'replace found string with this string'); |
SELECT config_id, path, value FROM core_config_data WHERE value LIKE "http%" AND path LIKE "%web%"; |