Skip to content

Instantly share code, notes, and snippets.

View dzhulk's full-sized avatar

Murat Dzhulkuttiev dzhulk

  • St. Petersburg, Russia
View GitHub Profile
class A
class A2 extends A
class B
trait M[X]
//
// Upper Type Bound
//
def upperTypeBound[AA <: A](x: AA): A = x
CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl" ruby-build --keep 2.0.0-p247 ~/.rubies/ruby-2.0.0-p247
Checking dependencies for json (1.8.0)
Checking dependencies for rake (10.1.0)
Checking dependencies for rdoc (4.0.1)
Checking dependencies for rubysl-rake (2.0.0)
Checking dependencies for ffi2-generators (0.1.1)
Checking dependencies for rubinius-profiler (2.0.0)
Checking dependencies for rubinius-coverage (2.0.1)
Checking dependencies for rubinius-debugger (2.0.0)
Checking dependencies for rubysl (2.0.7)/Users/murat/.rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/net/http.rb:919:in `connect': SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (OpenSSL::SSL::SSLError)
from /Users/murat/.rubies/ruby-2.1.0-preview1/lib/ruby/2.1.0/net/http.rb:919:in `block in connect'
tmux -u attach || tmux -u new
import java.lang.Character.{ LETTER_NUMBER => CR,LINE_SEPARATOR => LF }
import java.net.InetSocketAddress
import java.nio.channels.AsynchronousChannelGroup._
import java.nio.channels.AsynchronousServerSocketChannel._
import java.nio.channels.{ AsynchronousSocketChannel => ASC }
import java.nio.channels.CompletionHandler
import java.nio.ByteBuffer._
import java.util.concurrent.Executors._
import scala.annotation.implicitNotFound
import scala.collection.mutable.ListBuffer
@dzhulk
dzhulk / gist:5217922
Created March 21, 2013 23:59
textmate
defaults write com.macromates.TextMate.preview fileBrowserPlacement right
create table geoip (id integer, country varchar(19), region varchar(10), city varchar(255), postal_code varchar(255), latitude real, longitude real, metroCode varchar(10), areaCode varchar(10) );
@dzhulk
dzhulk / gist:4169852
Created November 29, 2012 15:37
rbx report
Rubinius Crash Report #rbxcrashreport
Error: signal SIGILL
[[Backtrace]]
0 rbx 0x0000000108219df0 _ZN8rubiniusL12segv_handlerEi + 544
1 libsystem_c.dylib 0x00007fff8ce1b8ea _sigtramp + 26
2 ??? 0x0000000000000006 0x0 + 6
3 rbx 0x000000010821e198 _ZN8rubinius3bugEPKc + 72
4 rbx 0x00000001083012d8 _ZN8rubinius11SharedState26add_global_handle_locationEPPNS_4capi6HandleEPKci + 1222
@dzhulk
dzhulk / crash
Created November 29, 2012 15:34
crash
rbx -S rails s
==================================== ERROR ====================================
| An extension is trying to add an invalid handle at the following location: |
| v8_handle.cpp:31 |
| |
| An invalid handle means that it points to an invalid VALUE. This can happen |
| when you haven't initialized the VALUE pointer yet, in which case we |
| suggest either initializing it properly or otherwise first initialize it to |
| NULL if you can only set it to a proper VALUE pointer afterwards. Consider |
@dzhulk
dzhulk / workers.rb
Created November 9, 2012 08:47 — forked from schmurfy/workers.rb
Celluloid workers
require 'celluloid'
WORKERS_COUNT = (ARGV[0] || 1).to_i
class Output
include Celluloid
def puts(msg)
Kernel.puts(msg)
end