Skip to content

Instantly share code, notes, and snippets.

Yevhen Viktorov yevgenko

Block or report user

Report or block yevgenko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sf_cc_webscript.php
<?php
require_once 'path/to/symfony/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
$fs = new sfFilesystem();
$command = sprintf('%s -n "%s" %s', 'path/to/php', 'path/to/project/root/symfony', 'cc');
$res = $fs->sh($command);
echo $res;
@yevgenko
yevgenko / x
Created Apr 17, 2009 — forked from symbiat/x
View x
CmdUtils.CreateCommand({
name: "sf",
icon: "http://www.symfony-project.org/favicon.ico",
author: { name: "Ajai Khattri", email: "ajai@bitblit.net"},
license: "GPL",
description: "Searches the symfony API docs for words.",
takes: {"search term": noun_arb_text},
preview: function(pblock, directObject, modifiers) {
View magento-fix-cli-installer-locale-saving-problem.patch
From eeed25bdbbbdb74fb81e243ef6714f4cb8a80094 Mon Sep 17 00:00:00 2001
From: Yevgeniy A. Viktorov <wik@osmonitoring.com>
Date: Fri, 1 May 2009 20:20:58 +0300
Subject: [PATCH] fix installer: locale saving problem
---
app/code/core/Mage/Install/Model/Installer.php | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/app/code/core/Mage/Install/Model/Installer.php b/app/code/core/Mage/Install/Model/Installer.php
View Recursively add .gitignore files to empty dirs
# Recursively add a .gitignore file to all directories
# in the working directory which are empty and don't
# start with a dot. Helpful for tracking empty dirs
# in a git repository.
for i in $(find . -type d -regex ``./[^.].*'' -empty); do touch $i"/.gitignore"; done;
View drush_make_pressflow
core = "6.x"
projects[pressflow][type] = "core"
projects[pressflow][download][type] = "git"
projects[pressflow][download][url] = git://github.com/bigmack83/pressflow-6.git
projects[] = "cck"
View Translate.php
<?php
class TJU_Core_Model_Translate extends Mage_Core_Model_Translate
{
/**
* Retrieve translated template file
* Try current design package first
*
* @param string $file
* @param string $type
View config.xml
<?xml version="1.0"?>
<config>
<global>
<models>
<core>
<rewrite>
<translate>TJU_Core_Model_Translate</translate>
</rewrite>
</core>
</models>
View TJU_All.xml
<config>
<modules>
<TJU_Core>
<active>true</active>
<codePool>local</codePool>
</TJU_Core>
</modules>
</config>
@yevgenko
yevgenko / email.sh
Created Apr 17, 2010
script to override email templates in Magento
View email.sh
#!/bin/sh
phone='(XXX) XXX-XXXX'
email='example@example.com'
basedir='app/design/frontend/tjuInterface/default'
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i 's/alt="Magento"/alt="{{var order.getStoreGroupName()}}"/g' '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i 's/Magento Demo Store/{{var order.getStoreGroupName()}} /g' '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i 's/Demo Store/{{var order.getStoreGroupName()}} /g' '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i "s/mailto:magento@varien.com/mailto:$email/g" '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i "s/dummyemail@magentocommerce.com/$email/g" '{}' \;
View sfWidgetFormReCaptcha2.class.php
<?php
class sfWidgetFormReCaptcha2 extends sfWidgetFormReCaptcha
{
/**
* @see sfWidgetFormReCaptcha
*/
public function render($name, $value = null, $attributes = array(), $errors = array())
{
$server = $this->getServerUrl();
You can’t perform that action at this time.