Skip to content

Instantly share code, notes, and snippets.

View kovyrin's full-sized avatar

Oleksiy Kovyrin kovyrin

View GitHub Profile
#!/usr/bin/env ruby
require 'thrift'
$:.push(File.dirname(__FILE__) + "/../src/gen-rb")
require 'FastQueue_constants'
require 'FastQueue'
# Talk to a server via TCP sockets, using a binary protocol
location ~ ^/upload/(bulk_1|java_bulk_1|single|rev_upload)$ {
error_log logs/upload.scribd.error.log info;
access_log logs/upload.scribd.access.log main;
set $upload_uri $uri?$args;
if ($request_method = GET) {
rewrite .* /internal_upload last;
}
# Pass altered request body to this location
diff --git a/vendor/plugins/db-charmer/lib/db_charmer/connection_proxy.rb b/vendor/plugins/db-charmer/lib/db_charmer/connection_proxy.rb
index b2a6959..ac583f5 100644
--- a/vendor/plugins/db-charmer/lib/db_charmer/connection_proxy.rb
+++ b/vendor/plugins/db-charmer/lib/db_charmer/connection_proxy.rb
@@ -1,14 +1,14 @@
module DbCharmer
class ConnectionProxy < BlankSlate
- @@abstract_connection_class = nil
+ @abstract_connection_class = nil
>> CopyrightMatch.first.infringing_upload
=> #<WordUpload id: 3982, original_filename: "(ebook-pdf) philosophy - encyclopedia of philosophy...", extension: "pdf", word_count: 2141763, character_count: 10615093, character_count_with_spaces: 12741973, line_count: 166461, paragraph_count: 14554, page_count: 3901, guid: "a8npts30ukbo0", word_bulk_upload_id: 358, word_user_id: 665, sentence_count: 75822, md5: "141bf3c9fa1e319643f775bf87caa24e", copyright_match: 0, language_id: 1, slurp: nil, encrypted: 0, college: nil, keywords: nil, college_id: nil, created_at: "2007-03-06 23:23:34">
>> CopyrightMatch.first.infringing_upload.word_document
=> #<WordDocument id: 3965, word_upload_id: 3982, title: "(ebook-pdf) philosophy - encyclopedia of philosophy...", description: "", authors_note: nil, word_user_id: 665, created_at: "2007-03-07 00:23:34", default_format: 0, copyright_id: 1, word_download: 1, text_download: 1, printfu: 1, converted: 1, submitted: 1, show_comments: 1, removal_id: 100, published: 0, deleted: 0, sla
Index: src/searchd.cpp
===================================================================
--- src/searchd.cpp (revision 2028)
+++ src/searchd.cpp (working copy)
@@ -990,7 +990,7 @@
void sigterm ( int )
{
// in child, bail out immediately
- if ( !g_bHeadDaemon && g_bAcceptUnlocked )
+ if ( !g_bHeadDaemon && g_bAcceptUnlocked && g_eWorkers != MPM_PREFORK )
1) Install pre-requisites
$ sudo port install libiconv slang2
2) Download the sources from http://www.midnight-commander.org/downloads
3) Configure the build:
./configure --prefix=/opt/mc --with-screen=slang --enable-extcharset --enable-charset --with-libiconv-prefix=/opt/local --with-slang-includes=/opt/local/include --with-slang-libs=/opt/local/lib
hbase(main):003:0> help 'ddl'
TABLES MANAGEMENT COMMANDS
--------------------------------------------------------------------------------
COMMAND: alter
Alter column family schema; pass table name and a dictionary
specifying new column family schema. Dictionaries are described
on the main help command output. Dictionary must include name
of column family to alter. For example,
module Shell
module Commands
class Alter < Command
def help
return <<-EOF
Alter column family schema; pass table name and a dictionary
specifying new column family schema. Dictionaries are described
on the main help command output. Dictionary must include name
of column family to alter. For example,
~/work/git/hbase (HBASE-2279)
[00:04] $ git diff --stat trunk HEAD
.gitignore | 1 +
Rakefile | 8 +
bin/Formatter.rb | 145 -----
bin/HBase.rb | 676 --------------------
bin/hirb.rb | 454 ++------------
bin/ruby_test_runner.rb | 12 +
core/src/main/ruby/hbase.rb | 67 ++
core/src/main/ruby/hbase/admin.rb | 342 ++++++++++
~/work/git/hbase (HBASE-2279)
[00:06] $ ./bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version: 0.21.0-SNAPSHOT, rUnknown, Wed Mar 3 13:39:18 EST 2010
hbase(main):001:0> help
There are few groups of commands in Hbase
Use help 'group_name' (e.g. help 'general') to get help on all commands in a group