Skip to content

Instantly share code, notes, and snippets.

View digitalextremist's full-sized avatar
🏴

//de digitalextremist

🏴
View GitHub Profile
@digitalextremist
digitalextremist / gist:9f6c9b556f0efefd0819
Created January 24, 2015 10:09
nio4r build failure @qrohlf gets on OSX 10.10
$ gem install nio4r -v '1.0.0'
ERROR: Error installing nio4r:
ERROR: Failed to build gem native extension.
/Users/qrohlf/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20150120-2702-11w6zzo.rb extconf.rb
checking for rb_thread_blocking_region()... no
checking for sys/select.h... yes
checking for poll.h... yes
checking for sys/epoll.h... no
checking for sys/event.h... yes
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f425049b4c1, pid=19966, tid=139922265310976
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x3e94c1] CallGenerator::for_method_handle_inline(JVMState*, ciMethod*, ciMethod*, bool&)+0x591
#
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f49cbaac4c1, pid=16804, tid=139954030249728
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x3e94c1] CallGenerator::for_method_handle_inline(JVMState*, ciMethod*, ciMethod*, bool&)+0x591
#
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fa0bfbc14c1, pid=22136, tid=140327325411072
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x3e94c1] CallGenerator::for_method_handle_inline(JVMState*, ciMethod*, ciMethod*, bool&)+0x591
#
@digitalextremist
digitalextremist / keybase.md
Created April 9, 2015 19:52
keybase proof

Keybase proof

I hereby claim:

  • I am digitalextremist on github.
  • I am digitalextremist (https://keybase.io/digitalextremist) on keybase.
  • I have a public key whose fingerprint is 1B6D 4015 1739 5A0B 42D8 5F58 DF18 5FF4 9474 35ED

To claim this, I am signing this object:

@digitalextremist
digitalextremist / xorg.conf
Created May 24, 2015 09:56
Quatro Xorg configuration.
Section "ServerLayout"
Identifier "Quatro"
Screen 0 "Center" 1080 1080
Screen 1 "Left" 0 536
Screen 2 "Right" 3000 536
Screen 3 "Top" Above "Center"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1"
EndSection
module System
extend self
def cpu_count
return Java::Java.lang.Runtime.getRuntime.availableProcessors if defined? Java::Java
return File.read('/proc/cpuinfo').scan(/^processor\s*:/).size if File.exist? '/proc/cpuinfo'
require 'win32ole'
WIN32OLE.connect("winmgmts://").ExecQuery("select * from Win32_ComputerSystem").NumberOfProcessors
rescue LoadError
Integer `sysctl -n hw.ncpu 2>/dev/null` rescue 1
end
@digitalextremist
digitalextremist / mocker.rb
Last active August 29, 2015 14:27
Mock Actor::System to simulate the arrival of running actors, for the Unlocker GSoC project.
require 'celluloid/current'
class Mocker
include Celluloid
MAX_INTERVAL = 20
MAX_WORK = 30
MAX_ID = 1000
attr_reader :id
def initialize(id)
@id = id
@digitalextremist
digitalextremist / 01E.ru
Last active December 15, 2015 16:49
Rack routing. Updated to show wildcarding.
map "/.conference" do; run Mu::Conference end
map "/.documentation" do; run Mu::Documentation end
map "/.development" do; run Mu::Development end
map "/.sources" do; run Mu::Sourcing end
@digitalextremist
digitalextremist / reel.rb
Created April 5, 2013 02:41
Sample Reel server, to cause reproducible error.
require 'rubygems'
require 'bundler/setup'
require 'reel'
class MyServer < Reel::Server
def initialize(host = "0.0.0.0", port = 80)
super(host, port, &method(:on_connection))
end
def on_connection(connection)