Skip to content

Instantly share code, notes, and snippets.

View morenocarullo's full-sized avatar

Moreno Carullo morenocarullo

View GitHub Profile
kernel:
image: linuxkit/kernel:5.4.28
cmdline: "console=tty0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:69b4a35eaa22eba4990ee52cccc8f48f6c08ed03
- linuxkit/containerd:09553963ed9da626c25cf8acdf6d62ec37645412
- linuxkit/ca-certificates:v0.7
onboot:
- name: sysctl
#!/bin/sh
### BEGIN INIT INFO
# Provides:x11vnc
# Required-Start:$remote_fs $syslog
# Required-Stop:$remote_fs $syslog
# Default-Start:2 3 4 5
# Default-Stop:0 1 6
# Short-Description:Start X11VNC
# Description:Start VNC server X11VNC at boot
@morenocarullo
morenocarullo / ruby_valgrind
Created September 6, 2012 10:20
Valgrind + Ruby 1.9.3 on Ubuntu 12.04
moreno@darwin:~/progetti/java_bin$ valgrind --partial-loads-ok=yes --undef-value-errors=no ruby -I'lib:test:ext' test/test_valgrind_check.rb
==6535== Memcheck, a memory error detector
==6535== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==6535== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==6535== Command: ruby -Ilib:test:ext test/test_valgrind_check.rb
==6535==
==6535== Invalid read of size 4
==6535== at 0x4E861D3: glob_helper (dir.c:1139)
==6535== by 0x4E86B0B: ruby_glob0 (dir.c:1516)
==6535== by 0x4E87194: rb_push_glob (dir.c:1655)
@morenocarullo
morenocarullo / weird_cookie_middleware.rb
Created April 18, 2012 12:05
WeirdCookieMiddleware
@morenocarullo
morenocarullo / polymorph_if
Created October 11, 2011 06:31
eXtreme Polymorphysm
class FalseClass
def if_false(&block)
block.call
self
end
def if_true(&block)
self
end
end