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
<html> | |
<head> | |
<!-- Load Ooyala Player --> | |
<script src='http://player.ooyala.com/v3/replace_with_player_branding_id'></script> | |
</head> | |
<body> | |
<!-- Player Placement --> |
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
<html> | |
<head> | |
<!-- Load Ooyala Player --> | |
<script src='http://player.ooyala.com/v3/replace_with_player_branding_id'></script> | |
<!-- Load additional custom modules --> | |
<script src='/mymodule.js'></script> | |
</head> |
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
<html> | |
<head> | |
<script src='http://player.ooyala.com/player/v2/bootstrap.js?pc=espn_main_player'></script> | |
</head> | |
<body> | |
<div id='playerwrapper' style='width:480px;height:360px;'></div> |
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
--- httrack-3.44.1/src/htsglobal.h 2011-02-28 16:48:54.000000000 +0200 | |
+++ httrack-3.44.1.fixed/src/htsglobal.h 2011-07-25 23:53:35.000000000 +0300 | |
@@ -487,7 +487,7 @@ | |
// surveillance de la connexion | |
#define CNXDEBUG 0 | |
// debuggage cookies | |
-#define DEBUG_COOK 0 | |
+#define DEBUG_COOK 1 | |
// d?buggage hard.. | |
#define HTS_WIDE_DEBUG 0 |
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
#usage | |
a = [1,2] | |
b = [1,nil] | |
a.extend(ArrayWithNilCompareHack) | |
b.extend(ArrayWithNilCompareHack) | |
a<=>b # works | |
# code | |
module ArrayWithNilCompareHack | |
def <=>(other) |
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
var self = $('#mydiv'); | |
// define | |
self.unbind('my-event'); | |
self.bind('my-event', function() {alert('yes')}); | |
// trigger | |
self.trigger('my-event'); |
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
// definition | |
$.fn.customFunction = function(options) { | |
var defaults = { | |
width: 650, | |
height: 450 | |
}; | |
var opts = $.extend(defaults, options); | |
var self = $(this[0]); // if working on first/single element | |
// functionality here |
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
require 'hpricot' | |
require 'open-uri' | |
doc = open('http://www.articlesbase.com/investing-articles/tips-for-successful-private-placement-trading-4339216.html') {|f| Hpricot(f)} | |
doc.search("script").remove | |
doc.search("style").remove | |
puts doc.search("body").text |
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
str.reverse.gsub(/(\d\d\d)(?=\d)(?!\d*\.)/,'\1,').reverse |
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
require 'mysql2' | |
require 'mysql2/em' | |
class MysqlConnectionPool | |
def initialize(conf) | |
@pool_size = conf[:size] || 10 | |
@connections = [] | |
@query_queue = EM::Queue.new | |
start_queue conf |
NewerOlder