Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
    • Graphic
    • HTML / PHP / CMS
    • Java
    • PL / SQL
    • Magento
    • python
    • Asterisk
    • C / C++
    • JavaScript
    • Json
    • Magento
      • Cache
      • Configuration
      • Database select
      • Delete unused product images
      • Erase credit card
      • Installation
      • Java Connector
      • Magento code snippet
      • mkMagentoDump.sh
      • snippets
    • OpenOffice / LibreOffice
    • Perl
    • Postfix
    • Regular Expression
    • TLA
    • Tomcat
    • Zenity
    • bash
    • find
    • git
    • ofbiz
    • wildfly
    • xml
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
# clear cache
foreach ( Mage::helper( 'core' )->getCacheTypes() as $type => $label ) {
    echo $label . "\n";
} 
http://www.magentocommerce.com/boards/viewthread/43238/#t156277


----------------------------------------------------

require_once 'app/Mage.php';
umask(0);

Mage::app()->cleanCache();
flush();

$collection = Mage::getSingleton('index/indexer')->getProcessesCollection();

foreach ($collection as $process) {
    if ($process->isLocked()) {
        $process->unlock();
    }
    $process->reindexEverything();
} 


# create category with static cms page
https://magento.stackexchange.com/questions/84830/how-to-create-category-programatically
<?php
require '/var/www/html/app/Mage.php';
Mage::app("admin");
$bar=$_SERVER['argv'][1];
try{
    $category = Mage::getModel('catalog/category');
    $category->setName("Foo $bar");
    $category->setUrlKey("foo-$bar");
    $category->setIsActive(1);
    $category->setDisplayMode(Mage_Catalog_Model_Category::DM_PAGE);
    $category->setIsAnchor(1);
#    $category->setStoreId(Mage::app()->getStore()->getId());
    $category->setStoreId(0);
    $category->setLandingPage(46);
    $parentCategory = Mage::getModel('catalog/category')->load(2230);
    $category->setPath($parentCategory->getPath());
    $category->save();
} catch(Exception $e) {
    var_dump($e);
}
?>

# delete url_rewrite
https://magento.stackexchange.com/questions/100523/delete-url-rewrite-programmatically
<?php
require '/var/www/html/app/Mage.php';
Mage::app("admin");
$path="%foo/bar-123%";
try{
    $coll = Mage::getModel('core/url_rewrite')->getCollection();
    $coll->addFieldToFilter('request_path', array('like' => $path));
    foreach ($coll->getItems() as $rewrite){
	echo var_dump($rewrite);
        $rewrite->delete();
    }
} catch(Exception $e) {
    var_dump($e);
}
?>
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung