Skip to content

Instantly share code, notes, and snippets.

View Maksold's full-sized avatar

Maksim Soldatjonok Maksold

  • Latvia
View GitHub Profile
@dzungtran
dzungtran / list.md
Created March 24, 2015 03:30
List of tables to safely truncate in Magento

Before you do anything

  • Make sure you test clearing this data in a non-production environment first.
  • Always make backups before you lose data forever.
  • Make sure you're truncateing, not droping.
  • Probably a good idea to reindex everything via shell after mass deleting records

To expand on Jim's answer, Magento Support doesn't need the contents of these tables when they ask for a copy of your DB, so you could consider them non-essential.

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 23, 2024 12:17
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@parhamr
parhamr / 0: Magento 1.12 Enterprise multi-store cluster configuration.md
Last active October 13, 2023 14:20
A highly available, fault tolerant, distributed, and load balanced LEMP cluster.
@Maksold
Maksold / data-install-0.0.1.php
Last active October 25, 2018 12:51
#magento - Create Transactional Email in #migration script
<?php
/** @var $installer Scandi_Migrations_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$templates = array(
array(
"name" => "New Invoice",
"code" => "sales_email_invoice_template",
"config" => "sales_email/invoice/template",
@iwek
iwek / find-in-json.js
Created October 20, 2012 21:43
Searching through JSON
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not)
if (i == key && obj[i] == val || i == key && val == '') { //
@s0what
s0what / nginx.logrotate.conf
Created March 6, 2012 11:55
logrotate for nginx
/var/log/nginx/*.log{
daily
missingok
rotate 7
compress
dateext
delaycompress
notifempty
sharedscripts
postrotate
@vxnick
vxnick / gist:380904
Created April 27, 2010 15:52
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',