Skip to content

Instantly share code, notes, and snippets.

View AGelzer's full-sized avatar
🎯
Focusing

Alexander Gelzer AGelzer

🎯
Focusing
  • eCommerce Werkstatt GmbH
  • Germany, Bad Salzuflen
View GitHub Profile
@Tehnix
Tehnix / CI.yml
Created March 30, 2020 21:21 — forked from FedericoPonzi/CI.yml
Ready to use Github workflow for cross-compiling a rust binary to many Linux architectures.
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci
name: CI
on:
pull_request:
push:
branches:
- master
tags:
- 'v*.*.*'
@vielhuber
vielhuber / README.md
Last active April 25, 2025 09:02
lamp #windows

features

  • wsl2 + ubuntu 22
  • simple installation
  • simple usage via command line
  • full control over configuration
  • cronjobs enabled
  • default remote smtp relay for all mailings
  • databases included: mysql (+phpmyadmin), postgresql, oraclesql
  • shared php.ini configuration for all versions
@colinmollenhour
colinmollenhour / log_deadlocks.sh
Created April 25, 2018 08:20
Log Innodb Deadlocks
#!/bin/bash
dir=/root/deadlocks
[ -d $dir ] || mkdir -p $dir
cd $dir || { echo "Could not cd to $dir"; exit 1; }
mysql -be 'show engine innodb status;' \
| sed 's/\\n/\n/g' \
| awk '/TRANSACTIONS/{flag=0}flag;/LATEST DETECTED DEADLOCK/{flag=1}' \
> latest.txt
@taufek
taufek / pre-push
Last active January 10, 2023 17:40
PrePush Git Hook with PhpCs and PhpStan
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
exec < /dev/tty
@cmtickle
cmtickle / unbuffered_shell_example.php
Created January 31, 2018 14:55
Use unbuffered SQL queries with Magento to reduce memory usage on large data sets.
<?php
require_once 'abstract.php';
class Cmtickle_Demo_Shell_Tool extends Mage_Shell_Abstract
{
private $_readConnection = null;
protected function _getReadConnection()
{
@philgyford
philgyford / .gitignore
Last active March 1, 2023 09:18
A script for importing images, and data about them in a CSV file, into WordPress
images/*
*.csv
@evgv
evgv / mage_update_attribute_via_upgrade_script.md
Last active April 28, 2020 09:03
Magento. Update attribute via install/upgrade script.

Update attribute via install/upgrade script

In example below I upgraded is_visible_on_front and used_in_product_listing from false to true for two attributes namely flavor and unit_count. These attributes are product attributes and refer to Mage_Catalog_Model_Product::ENTITY or catalog_product. For update attribute params we are need the: entity id of attribute, id of attribute, field name what we wont to change, new field value and sort order. Function what we will use is updateAttribute from class Mage_Eav_Model_Entity_Setup.

Install/upgrade script in my case this is the mysql4-upgrade-1.1.4-1.1.5.php

    /* @var $installer Mage_Catalog_Model_Resource_Setup */
@Saissaken
Saissaken / Update git fork with tags.sh
Last active April 6, 2025 04:17
Update git fork with tags
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone https://github.com/superteam/myframework.git
cd myframework
git remote add upstream https://github.com/someuser/myframework.git
# Update:
git fetch upstream
@colinmollenhour
colinmollenhour / shell_delete_unused_images.php
Last active February 17, 2020 18:51 — forked from aleron75/shell_delete_unused_images
Delete no more used Product Images on Magento
<?php
require_once 'abstract.php';
class Mage_Shell_CheckImages extends Mage_Shell_Abstract
{
const CATALOG_PRODUCT = '/catalog/product';
const CACHE = '/cache/';
public function run()
@cjsteel
cjsteel / Staging&ProductionUsingGit.md
Last active March 10, 2025 12:20 — forked from mylesthedev/Staging&ProductionUsingGit
Staging and Production Server using Git.

If you are running a large project such as a website or ansible server you will want to test new features before pushing them into production then something like the following setup may work for you.

For this example imagine your url is mysite.ca and you want a development/staging site on a subdomain which is dev.mysite.ca

Setup

For websites

Create the website's domain and subdomain