Skip to content

Instantly share code, notes, and snippets.

View digitalextremist's full-sized avatar
🏴

//de digitalextremist

🏴
View GitHub Profile
@digitalextremist
digitalextremist / dismantler.cr
Last active January 30, 2020 17:34
Clarity.dismantler
module Clarity
alias Value = Nil | String | Bool |
Int64 |
Int32 |
Float64 |
Array(Value) |
Hash(String, Value)
def self.dismantler(a)
# Acts like an array and receives futures. Will yield them as
# they become ready.
class HackedMultiplexer
include Celluloid
include Enumerable
def initialize
@not_ready = []
end
@digitalextremist
digitalextremist / 0_reuse_code.js
Created May 26, 2016 16:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@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
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 / 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
@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:

#
# 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
#
#
# 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=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
#