Skip to content

Instantly share code, notes, and snippets.

@choallin
choallin / deadlock_mutex.rb
Created June 18, 2019 16:03
Deadlock by mutex
mutext_resource_a = Mutex.new
mutext_resource_b = Mutex.new
resource_a = []
resource_b = []
threads = []
threads << Thread.new do |t|
# The number is on purpose so high, so that it will create
# a deadlock in your irb as well
class InterfaceController < ApplicationController
def interface_defintion
{
"HL7" => {
"Version_2_3" => Services::Interfaces::HL7::Version_2_3.new
},
"GDT" => {
"Version_2_1" => Services::Interfaces::GDT::Version_2_1.new
},
case interface_typ
when "HL7"
case interface_version
when "2.3.1"
Hl7Helper.hl7_2_3_1_export_lab @@actual_konfig_interface
else
# Do some stuff
end
when "GDT"
case interface_version
@choallin
choallin / .spacemacs
Last active February 22, 2018 11:51
My spacemacs configuration
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@choallin
choallin / Default (Linux).sublime-keymap
Last active February 25, 2020 08:44
Sublime configuraton II
[
{ "keys": ["ctrl+#"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+#"], "command": "toggle_comment", "args": { "block": true } },
{
"keys": ["super+alt+right"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.66, 1.0],
@choallin
choallin / Main.sublime-menu
Created October 27, 2014 08:26
Sublime configuration
[{
"id": "view",
"children": [{
"id": "layout",
"children": [
{
"command": "set_layout",
"caption" : "Custom: 3 Pane (2T 1B)",
"mnemonic": "C",
"args": {
@choallin
choallin / .bash_aliases
Last active July 13, 2016 11:54
ubuntu config
#du -h damit es lesbare werte ausgibt
alias du='du -h'
#update check kürzer
alias agu='sudo apt-get update'
#install kürzer
alias agi='sudo apt-get install'
#upgrade