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
// THIS IS A HACK | |
$value_query = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($HTTP_COOKIE_VARS['osCsid']) . "' and expiry > '" . time() . "'"); | |
$fakecart = preg_replace("/^\w+\|(.+)$/","$1",tep_db_fetch_array($value_query)); | |
$cart = new shoppingCart; | |
$cart->unserialize($fakecart); |
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 | |
/* | |
Plugin Name: Get OSCommerce Cart Contents from session | |
Plugin URI: http://325i.org/osc | |
Description: allows you to retrieve the cart contents from your OSCommerce install. Requires that your cookie path would include both OSC and wordpress. Works with OSCommerce 2.2RC2. | |
Author: Michael J. Cohen <mjc@kernel.org> | |
Version: 1 | |
Author URI: http://325i.org | |
*/ |
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
id3v2 tag info for 09 Like The Weather.mp3: | |
UFID (Unique file identifier): http://musicbrainz.org, 36 bytes | |
TIT2 (Title/songname/content description): Like The Weather | |
TPE1 (Lead performer(s)/Soloist(s)): 10,000 Maniacs | |
TALB (Album/Movie/Show title): MTV Unplugged | |
TCON (Content type): Folk Rock (255) | |
TRCK (Track number/Position in set): 09/14 | |
TYER (Year): 1993 | |
USLT (Unsynchronized lyric/text transcription): ()[eng]: | |
TXXX (User defined text information): (ALBUMARTISTSORT): 10,000 Maniacsss |
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
/**************************************************** | |
Author: Brian J Clifton | |
Url: http://www.advanced-web-metrics.com | |
This script is free to use as long as this info is left in | |
DESCRIPTION: Script for tracking regional and custom search engines. Requires ga.js | |
READ: http://www.advanced-web-metrics.com/blog/2008/09/14/customising-the-list-of-search-engines-in-google-analytics/ | |
All scripts presented have been tested and validated by the author and are believed to be correct | |
as of the date of publication or posting. The Google Analytics software on which they depend is |
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
CFLAGS="-g -Wall" | |
DEPS="foo.o bar.o baz.o" | |
TARGET=progname | |
.PHONY: clean all | |
$(TARGET): $(DEPS) | |
$(CXX) -o $(TARGET) $(CFLAGS) $(CXXFLAGS) $(DEPS) |
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
delimiter $$ | |
CREATE FUNCTION ISO8601_DATETIME(iso varchar(26)) | |
RETURNS DATETIME | |
DETERMINISTIC | |
BEGIN | |
RETURN CONVERT_TZ( | |
STR_TO_DATE( | |
CONCAT(SUBSTRING(iso, 1, 10), | |
' ', | |
SUBSTRING(iso, 12, 8)), |
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 php | |
<?php | |
$statusurl = 'http://my.jetpack/srv/status'; | |
/* | |
returned data looks like this: | |
array( | |
'notificationFlag' => 1, | |
'statusBarActivityVisible' => 1, |
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
diff --git a/lib/20/net/http.rb b/lib/20/net/http.rb | |
index fd8c802..2266617 100644 | |
--- a/lib/20/net/http.rb | |
+++ b/lib/20/net/http.rb | |
@@ -321,7 +321,7 @@ module Net #:nodoc: | |
# HTTPResetContent:: 205 | |
# HTTPPartialContent:: 206 | |
# HTTPRedirection:: 3xx | |
- # HTTPMultipleChoice:: 300 | |
+ # HTTPMultipleChoices:: 300 |
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
class Moo | |
def self.moo | |
a = 50a | |
end | |
end | |
# require './moo.rb' in pry | |
# rbx: | |
# SyntaxError: /usr/local/rvm/rubies/rbx-head/runtime/melbourne.rbc:81: expecting keyword_end | |
# from /usr/local/rvm/rubies/rbx-head/runtime/melbourne.rbc:81:in `syntax_error' |
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
index 652e40c..233d9df 100644 | |
--- a/activemerchant.gemspec | |
+++ b/activemerchant.gemspec | |
@@ -13,8 +13,8 @@ Gem::Specification.new do |s| | |
s.homepage = 'http://activemerchant.org/' | |
s.rubyforge_project = 'activemerchant' | |
- s.files = Dir['CHANGELOG', 'README.md', 'MIT-LICENSE', 'CONTRIBUTORS', 'gem-public_cert.pem', 'lib/**/*', 'vendor/**/*'] | |
- s.require_path = 'lib' | |
+ s.files = Dir['CHANGELOG', 'README.md', 'MIT-LICENSE', 'CONTRIBUTORS', 'gem-public_cert.pem', 'lib/**/*', 'vendor/**/*', 'ext/nokogiri_conf.rb'] |