Skip to content

Instantly share code, notes, and snippets.

<?php
$this->widgetSchema['captcha'] = new sfWidgetFormReCaptcha2(array(
'public_key' => sfConfig::get('app_recaptcha_public_key')
));
<?php use_javascript('http://api.recaptcha.net/js/recaptcha_ajax.js') ?>
@yevgenko
yevgenko / Firephp.php
Created April 17, 2010 02:57
FirePhp wrapper for magento
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@yevgenko
yevgenko / view.phtml
Created April 17, 2010 03:00
Tinycarts_Debug_Firephp usage example
<?php
// Tinycarts_Debug_Firephp usage example
Tinycarts_Debug_Firephp::send($this->debug(), 'Product view page aka view.phtml VAR: $this');
Tinycarts_Debug_Firephp::send($_product->debug(), 'Product view page aka view.phtml VAR: $_product');
@yevgenko
yevgenko / gist:380491
Created April 27, 2010 08:21
simultaneous spell checking for Russian and English
#!/usr/bin/perl -ln
# aspell wrapper to have spell checking simultaneously for Russian and English
# from http://powerman.name/config/vim.html
# put this code into ~/bin/aspell and make executable
BEGIN {
($OPT = " @ARGV ") =~ s/\s+-d\s+\w+//g;
$IS_APPEND = $OPT =~ /\s-a\s/;
@ARGV = ('-');
umask 077;
open $R,"| /usr/bin/aspell $OPT -d russian --ignore-accents >/tmp/aspell_ru.$$";
## from libcloud.types import Provider
## from libcloud.providers import get_driver
require 'fog/types'
require 'fog/providers'
## EC2 = get_driver(Provider.EC2)
## Slicehost = get_driver(Provider.SLICEHOST)
## Rackspace = get_driver(Provider.RACKSPACE)
EC2 = Fog::Provider.new(:ec2) # syntax 1
STDOUT.sync = true
require 'queue'
start_time = Time.now.to_i
msg = 0
queue = Queue.new("testing")
queue.subscribe do |obj|
msg += 1
@yevgenko
yevgenko / apache-site.conf.erb
Created August 25, 2010 10:23
chef magento roles examples
<% if @params[:ssl] %>
<VirtualHost <%= node[:ipaddress] %>:443>
ServerName <% if node[:magento][:server][:secure_domain] %><%= node[:magento][:server][:secure_domain] %><% else %><%= @params[:server_name] %><% end %>
SSLEngine on
SSLCertificateKeyFile ssl/<%= @params[:server_name] %>.pem
SSLCertificateFile ssl/<%= @params[:server_name] %>.pem
SSLProtocol all
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
<% else %>
@yevgenko
yevgenko / desktopcouch-cli.py
Created April 5, 2011 21:09
Helper command that opening _utils page of desktopcouch
#!/usr/bin/python
# Copyright 2011 @Yeevgen
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
import os
import os.path
import re
import webbrowser
@yevgenko
yevgenko / id_rsa.pub
Created April 7, 2011 20:25
My old public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqYwYSgkTesI+mCvITnxHIh5+CIEpSbll2QyuEsR0qTFbsjUIKrYckBpBU3SksHkUJ9zV0TiZ7CBQwPDY7UOzoFNcPZjSNw8TZ3jJFnHDp4g8iPhNRQKGzx/xMafWYMGfnf/09RQLsXozYqkTEUVG021YyV4vZAMHXKsYyQtB/80SeZZhE/gCVlTD2Q7XzXLqZpFFHYPoua6T4/YRHvT7WHjUJTW8g89FJpV+USJ0FME7dQ6/ocB4wmIV1NOiPCo/LzzrM9fkLAU0QWsmHVOP2JrOrt1Rhw9Q9vFNyWVUpuWsq3oen53bOpnpbPivfNjLR+e9ViOy9l/1D5+Qy7zqIQ== wik@www