Skip to content

Instantly share code, notes, and snippets.

View razbakov's full-sized avatar
🖖
Hi

Aleksey Razbakov razbakov

🖖
Hi
View GitHub Profile
<?php
// Data Helper:
class Kirchbergerknorr_RelevanceIndexer_Helper_Data extends Mage_Core_Helper_Abstract
{
public function log($message, $level = null, $file = 'kk_relevanceindexer.log', $forceLog = false)
{
Mage::log($message, $level, $file, $forceLog);
}
}
@razbakov
razbakov / commit.sh
Last active August 29, 2015 14:07
Commit submodule and build project
cd /projects
cd mymodule
git commit -am "JIRA-1 My changes"
git push
cd ../targetproject
git checkout master-branch
rm -rf vendor/kirchbergerknorr/yourmodule/
composer update
git commit -am "JIRA-1 Updated mymodule"
git push
@razbakov
razbakov / modman-generator.sh
Last active August 9, 2016 16:28
Generate modman file
#!/bin/sh
#
# Generates magento modman file
#
# INSTALLATION:
# Save this file to /opt/deploy/tools/modman-generator.sh
# ln -s /opt/deploy/tools/modman-generator.sh /usr/local/bin/mg
# chmod a+x /usr/local/bin/mg
#
# USAGE:
@razbakov
razbakov / jenkins.conf
Last active March 26, 2023 06:50
Jenkins Apache Virtual Host
<Virtualhost *:80>
ServerName your.url.com
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
@razbakov
razbakov / git-diff.md
Created August 6, 2014 15:18
How to upload files to live without jenkins?

Run git log and look for commit hash:

9045d8fcbd3ebfb186e6b3b6d96732357ee5c315

To see which files where changed in this commit:

git diff --name-only 9045d8fcbd3ebfb186e6b3b6d96732357ee5c315
<?php
/**
* TecRepair Installator
*
* @category Kirchbergerknorr
* @package Kirchbergerknorr_TecRepair
* @author Aleksey Razbakov <ar@kirchbergerknorr.de>
* @copyright Copyright (c) 2014 kirchbergerknorr GmbH (http://www.kirchbergerknorr.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
{
"name": "company/project-name",
"description": "Project Name",
"minimum-stability": "dev",
"authors": [
{"name": "Your Name", "email": "your@email.com"}
],
"repositories": [
{"type": "git", "url": "https://github.com/kirchbergerknorr/phpunit"},
{"type": "git", "url": "https://github.com/kirchbergerknorr/magento-debug"},
<?php
/**
* Check if upload place exists
*
* @access private
* @param upload_place string
* @return string
*/
private function check_upload_place($upload_place)
{
@razbakov
razbakov / list.php
Last active December 20, 2015 08:59
<!-- Items list -->
<script type="text/javascript">
$(document).ready(function() {
// Drag-and-drop table with ordering feature
<?php if($table_rules['params']['ordered'] !== FALSE): ?>
$('#list_table').tableDnD({
onDrop: function(table, row) {
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="price" content="0.5900" />
</div>