This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** lib/Varien/Db/Select.php 2010-07-26 16:09:28.000000000 -0400 | |
--- lib/Varien/Db/Select.php 2010-12-28 15:42:19.000000000 -0500 | |
*************** | |
*** 33,38 **** | |
--- 33,40 ---- | |
*/ | |
class Varien_Db_Select extends Zend_Db_Select | |
{ | |
+ const TYPE_CONDITION = 'TYPE_CONDITION'; | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Grab the protocol being used | |
RewriteCond %{HTTPS} =on | |
RewriteRule ^(.+)$ - [env=ps:https] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.+)$ - [env=ps:http] | |
# Force WWW | |
RewriteCond %{HTTP_HOST} !^www\. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Update tables from one storage engine to another | |
// | |
// Written by Matt Stith for Nexcess.net | |
// May 3, 2011 | |
// | |
// CLI only | |
if (!defined('STDIN')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# timegrep.py by Dennis Williamson 20100113 | |
# in response to http://serverfault.com/questions/101744/fast-extraction-of-a-time-range-from-syslog-logfile | |
# thanks to serverfault user http://serverfault.com/users/1545/mike | |
# for the inspiration | |
# Perform a binary search through a log file to find a range of times | |
# and print the corresponding lines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// Debug | |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
#define DEBUG_ON // Toggle to DEBUG_OFF or comment out to hide all debug code | |
#ifdef DEBUG_ON | |
#define MSLog(format, ...) CFShow([[NSString stringWithFormat:@"<%@:%d> ",[[NSString stringWithUTF8String:__FILE__] lastPathComponent],__LINE__] stringByAppendingFormat:format, ## __VA_ARGS__]) | |
#else | |
#define MSlog(format, ...) | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product Names Guidelines | |
You may use Apple, iPad, or any other Apple word mark (but not the Apple Logo or other Apple-owned graphic symbol/logo) in a referential phrase on packaging or promotional/advertising materials to describe that the third party product is compatible with the referenced Apple product or technology, provided they comply with the following requirements. | |
a. The Apple word mark is not part of the product name. | |
b. The Apple word mark is used in a referential phrase such as "runs on," "for use with," "for," or "compatible with." | |
c. The Apple word mark appears less prominent than the product name. | |
d. The product is in fact compatible with, or otherwise works with, the referenced Apple product. | |
e. The reference to Apple does not create a sense of endorsement, sponsorship, or false association with Apple or Apple products or services. | |
f. The use does not show Apple or its products in a false or derogatory light. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name = %@",someVariableNameLol]; | |
NSArray *filteredArray = [friends filteredArrayUsingPredicate:predicate]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Testing the aasm gem to see how to get one aasm_event to decide | |
# which state to transition into | |
require 'rubygems' | |
require 'aasm' | |
class TestObject | |
include AASM | |
aasm_initial_state :active | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def allocated_date=(new_value) | |
write_attribute(:allocated_date, new_value) unless read_attribute(:allocated_date) | |
end |