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
pie@jungle ~ % irb | |
irb(main):001:0> require 'rexml/document' | |
=> true | |
irb(main):008:0> doc=REXML::Document.new(%(<html><head><script type="text/javascript">window.jQuery || document.write('<script src="{T_ASSETS_PATH}/javascript/jquery.js"><\\/script>')</script></head></html>)) | |
REXML::ParseException: #<REXML::ParseException: malformed XML: missing tag start | |
Line: | |
Position: | |
Last 80 unconsumed characters: | |
<\/script>')</script></head></html>> | |
/usr/local/lib/ruby/1.8/rexml/parsers/baseparser.rb:356:in `pull' |
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
(14:23:02) nn-: (13:36:13) naderman: you can easily install the phar extension - not that easy really | |
(14:23:16) nn-: i still cannot get php to execute phar files | |
(14:23:28) nn-: either on my system or on a fresh debian install i tried yesterday | |
(14:23:34) naderman: do you have suhosin? | |
(14:23:39) nn-: i do | |
(14:23:39) naderman: debian comes with suhosin | |
(14:23:46) naderman: it breaks phar by default unless you add some setting | |
(14:23:47) naderman: one sec | |
(14:24:19) naderman: http://silex.sensiolabs.org/doc/usage.html#pitfalls | |
(14:24:40) nn-: i'm pretty sure i did that |
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 | |
# Current timestamp can be obtained by, e.g.: | |
# | |
# perl -e 'print time' | |
import os, os.path, re, sys | |
if len(sys.argv) != 2: | |
print >>sys.stderr, "Usage: timestamp-asset-urls timestamp" |
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
(function($) { | |
var do_stuff = function() { | |
// ... | |
}; | |
do_stuff(); | |
})(jQuery); |
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 | |
if ($_SERVER['argc'] != 2) { | |
echo "Usage: kill-user user-id\n"; | |
exit(2); | |
} | |
require(dirname(__FILE__).'/../lib/phpbb/script_init.php'); |
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
exec unicorn -c doc/unicorn.rb -D |
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
# force load | |
ActiveRecord::Type::Integer | |
class ActiveRecord::Type::Integer | |
def initialize_with_pk_length_fix(options={}) | |
#options = {limit: 8}.update(options) | |
# apparently we are receiving limit: nil in options, override hard | |
options = options.merge(limit: 8) | |
initialize_without_pk_length_fix(options) | |
end |
OlderNewer