Skip to content

Instantly share code, notes, and snippets.

View cgdangelo's full-sized avatar

Charles D'Angelo cgdangelo

View GitHub Profile
@cgdangelo
cgdangelo / mage-wcl.md
Last active March 21, 2016 14:41
Mage metrics for log analysis

These are some basic metrics for evaluating Mage performance during a raid. It's not comprehensive, or even 100% accurate for indicating skill level, but it's a useful guideline to help guilds evaluate their trials or for raiders to identify flaws in their gameplay.

Note: Some queries require the actor name to be provided. Substitute your character's name for "Dikembe" wherever appropriate.

Arcane

Wasted Arcane Missiles

Every Arcane Missiles! offers 5 casts of Arcane Missiles. Therefore, the number of casts of Arcane Missiles should be 5 times greater than the number of Arcane Missiles! procs. Anything less indicates that Arcane Missiles were interrupted while channeling, or wasted outright.

d4tuuaGEfe5XaTlHI2Mqv7tiyMkiQ5IGzd4WiDtfHxJqCBkCEkQ2PKAVKDJQ9RGQFkenmfPghLOtR0qfLmyfKgoL6GcPVHqDmkY5uqOfQalLIclwuSCuEOqPNcTme1ZbnrfeyQImzjMUQlQGYvfc9me56c2OIKplQ2SKSDkbFuruFLsOPPiY3fQmskkASkiOrtjnErPojfLUfcPRPOUNqHlt1VL6Vk0YKscPkPlekKCmnfZPJjzYcnewewusyoRJtOzy2jBMjHzhzvf0VQjA8XlK55BZtMB7clMZPglyoRd2cnpYQkOFvtuttlmdfKi5SoWlchaSdPHeLvg(qhcwkqNp8HoGcsKCwh4fHzAwXzrwvb9R6PfUfHr5FbxB63Mp8HA3l)qHqhOkRE5xykYSgYdBQKqAPSFBofy8Snp3zqL0fwXOgoEg9uvplmUTCRAQjfpXdXzYKIN0m5HOLKMEsQIOtAwifyZ5chYdBQKqEWiX28CNbvTjHw9n36vn5zHanTOKWtbC(vsOra4Rs66cdqFeeGcHcpl4czuqxjHgbGVkPRlSIc(T5kj0ia8vjDDHGauiujHWLNd4cnJiNCehMUWYwvTGbGBUscncaFvsxxiRbCLeAea(QKUUUqpBBkV4fLrxiOsQ2KsczE(28K52UW7z)aZfc2antjvBstrmjljtIytMMjzPLZeppRkIots1Kv90QMKMkEYMINysKIFAsKjMmztwQkIotsx4weg1KWLVFeSnSb87fvBsif8BZHkjeEk7kje2bEze0kLZDaHtqH3zcHDGxeAw(Dwff0jeTuAoKGfDkrIgyuiHS64Cw0aJcNWllLa2bEbsiRiwhRzgZopxyPhHDGx0aDDH3Z(bMl0S87SkkOtiAPejhsWIoLirdmkKWeEzPesE2pWCiHyxgiGpIgDFRJdAwXzcJBl3QQjplKYxd63MRKq4PSRKqBMd9lSIwCH3CBxOnZH(1fAqxUscTzo0VW46mzaCDHvlFHwvsOnZH(fwrlUWBUTl0M5q
@cgdangelo
cgdangelo / gist:8834735
Created February 5, 2014 22:36
faking Magento requests
<?php
$_SERVER['HTTP_HOST'] = 'magento.local';
require 'app/Mage.php';
umask(0);
$request = new Mage_Core_Controller_Request_Http('http://magento.local/guitars-basses');
Mage::run('', 'store', array('request' => $request));
<?php
$basePath = Mage::getBaseDir('media') . DS . 'catalog' . DS . 'category' . DS;
$imagePath = Mage::registry('current_category')->getLogoImage();
$image = new Varien_Image($basePath . $imagePath);
$image->keepAspectRatio(true);
$image->keepTransparency(true);
$image->constrainOnly(true);
?>
<img src="<?php $image->resize(200, 100); ?>"/>
@cgdangelo
cgdangelo / _desktop.sass
Created June 18, 2013 17:56
Custom desktop grid in Foundation
$total-columns: 12
/* Desktop grid */
@media #{$medium}
@for $i from 1 through $total-columns
.desktop#{-$i}
@include grid-column($columns:$i,$collapse:null,$float:false)
@for $i from 0 through $total-columns - 1
.row .desktop-offset-#{$i}
require 'nokogiri'
document = Nokogiri::XML(File.read('app/etc/local.xml'))
child_node = Nokogiri::XML::Node.new("test_child", document))
child_node.content = "foo"
document.xpath('config/global/resources/default_setup/connection')[0].add_child(child_node)
File.open('app/etc/local.xml.modified', 'w') { |f| document.write_xml_to f }
@cgdangelo
cgdangelo / .gitignore
Created October 5, 2012 17:06
Magento .gitiginore
var/*
media/*
pkginfo/*
config/*
app/etc/local.xml
includes/*
Capfile
.idea/*
.DS_Store
*.*~
@cgdangelo
cgdangelo / gist:3498364
Created August 28, 2012 14:12
lol, magento
<?php
/* @var $tree Mage_Catalog_Model_Resource_Category_Tree */
$tree = Mage::getResourceModel('catalog/category_tree');
/* 594 = 616, 597 = 856 */
$storeCategories = $this->getStoreCategories();
$storeCategories->delete($storeCategories->searchById(594));
$storeCategories->delete($storeCategories->searchById(597));
$node = $tree->loadNode(616);
@cgdangelo
cgdangelo / gist:3495542
Created August 28, 2012 06:35
Magento Rakefile with some basic, common tasks
current_path = File.dirname(__FILE__)
parent_path = File.dirname(current_path)
project = File.basename(current_path)
namespace :mage do
desc 'Clear the Magento cache.'
task :cc do
sh %{cd #{current_path} && rm -rf var/cache/*}
end
@cgdangelo
cgdangelo / output
Created August 22, 2012 15:43
wat?
<?php
class X_TigerEDI_Model_Observer_850 extends X_TigerEDI_Model_Observer
{
protected $_ediID = 850;
private $_ediFiles = array();
/**