Skip to content

Instantly share code, notes, and snippets.

Oleg Pudeyev p

Block or report user

Report or block p

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
p / hai.rb
Created Dec 15, 2015
Rails 64 bit primary key fix for sqlite
View hai.rb
# force load
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)
p / 1 launch command
Created Dec 8, 2012
Integrity via Unicorn
View 1 launch command
exec unicorn -c doc/unicorn.rb -D
p / kill-user.php
Created Dec 7, 2012
phpbb kill user script
View kill-user.php
#!/usr/bin/env php
if ($_SERVER['argc'] != 2) {
echo "Usage: kill-user user-id\n";
View gist:2954780
(function($) {
var do_stuff = function() {
// ...
p /
Created Jan 20, 2012
Asset url timestamping for phpbb
#!/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"
p / 1
Created Nov 25, 2011
Executing phar files
View 1
(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:
(14:24:40) nn-: i'm pretty sure i did that
View gist:1263480
pie@jungle ~ % irb
irb(main):001:0> require 'rexml/document'
=> true
irb(main):008:0><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
Last 80 unconsumed characters:
/usr/local/lib/ruby/1.8/rexml/parsers/baseparser.rb:356:in `pull'
p / test reqs
Created Aug 20, 2011
phpbb todo
View test reqs
egosearch doing table scans on posts due to approved flag
move sqlite db to tests/tmp (pr #319)
add envvar check to override tests/tmp (pr #319)
(17:45:43) nn-: when i quote multiple lines of text as described in the ticket the lines are squashed into a single line
(17:45:55) nn-: worse, there is no spacing between what used to be separate lines at all
View orig
wooka% php -d include_path=$HOME/apps/thirdparty/phpunit/bundle/ ~/apps/thirdparty/phpunit/bundle/phpunit.php -c phpunit.xml.all tests/network/ftp_fsock_test.php
PHPUnit @package_version@ by Sebastian Bergmann.
Time: 1 second, Memory: 4.50Mb
There was 1 error:
1) phpbb_ftp_fsock_test::test_pasv_epsv
p / main
Created May 18, 2011
View main
qi_t21=> ANALYZE phpbb_topics;
qi_t21=> explain SELECT t.topic_id
qi_t21-> FROM phpbb_topics t
qi_t21-> WHERE t.forum_id = 2
qi_t21-> AND t.topic_type IN (0, 1)
qi_t21-> ORDER BY t.topic_type DESC, t.topic_last_post_time DESC
qi_t21-> LIMIT 25 OFFSET 100;
You can’t perform that action at this time.