Skip to content

Instantly share code, notes, and snippets.

View ticean's full-sized avatar

Ticean Bennett ticean

View GitHub Profile
@ticean
ticean / Magento Auto Snapshot
Created February 11, 2011 00:53
Creates snapshot of Magento db & media.
#/bin/sh
####################################################################################
# Magento Auto Snapshot
#
# This script has been integrated into Magento Shell Tools.
# Please see https://github.com/guidance/magento-shell-tools/blob/master/shell/snapshot.php
#
# Shell script that makes a backup of Magento's database and media directories.
# Intended for use on development environments. Bring new developers up to speed
# quickly.
@ticean
ticean / get-scalr-instances.sh
Created January 27, 2011 22:50
Get a list of Scalr instances for a particular role.
#!/bin/bash
##############################################################
# Get a list of Scalr instances for a particular role.
#
# PARAMS:
# ROLE_NAME - The Scalr role name.
#
##############################################################
ROLE_NAME="$1"
#!/bin/bash
echo "Setting up chef..."
sudo apt-get -y update
sudo apt-get -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert
cd /tmp
wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz
tar zxf rubygems-1.3.4.tgz
@ticean
ticean / MagentoChangeAdminPassword.sql
Created December 10, 2010 20:52
Change Magento password for admin user with SQL command.
UPDATE admin_user SET PASSWORD=MD5('password123'), lock_expires=NULL WHERE username='admin'
@ticean
ticean / Category.sql
Created December 10, 2010 04:45
A series of queries for selecting Magento entity EAV attributes, and their values. Lots of union here...
SET @entityid = '3';
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav
ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION
@ticean
ticean / convertMkv
Created December 10, 2010 04:22
sabnzbd/sickbeard post-process script that runs both sabToSickBeard and mkv conversion for XBox360, using handbrake.
#!/bin/bash
############################################################
# Recursively peruses a directory and converts MKV files
# to MP4 for streaming to Xbox360.
#
# @author: Ticean Bennett
# @url: http://ticean.com
# @see: http://trac.handbrake.fr/wiki/CLIGuide#options
#
# @param file The complete file path.
@ticean
ticean / apache-site.conf.erb
Created December 10, 2010 04:06 — forked from yevgenko/apache-site.conf.erb
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 %>