Skip to content

Instantly share code, notes, and snippets.

View heftig's full-sized avatar
🦄
Horsing around

Jan Alexander Steffens heftig

🦄
Horsing around
View GitHub Profile
[ +0.000013] WARNING: CPU: 5 PID: 205 at fs/btrfs/extent-tree.c:2927 btrfs_run_delayed_refs+0x262/0x290 [btrfs]()
[ +0.000001] BTRFS: Transaction aborted (error -17)
[ +0.000001] Modules linked in: sha256_ssse3 sha256_generic hmac drbg ansi_cprng ctr ccm rfcomm ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter joydev mousedev bnep input_leds psmouse serio_raw atkbd tpm_infineon libps2
[ +0.000031] tpm_tis ac processor sch_fq_codel usbip_host usbip_core snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_timer snd soundcore cuse fuse nfs lockd grace sunrpc fscache tpm_rng rng_core tpm vhba(C) ip_tab
[ +0.000034] CPU: 5 PID: 205 Comm: btrfs-transacti Tainted: G WC 4.4.0-2-zen #1
[ +0.000001] Hardware name: Notebook W740SU /W740SU , BIOS 4.6.5 09/11/2014
[ +0.000001] 0000000000000000 00000000c95b88e4 ffff8804090a7cf0 ffffffff812e1c69
[ +0.000002] ffff8804090a7d38 ffff8804090a7d28

I have an example YAML file:

---
- foo:
    - 1
    - 2
    - 3

- bar: test123
- lol: test456
import os
from gi.repository import GLib, Gio
# ---
def handle_lock():
print("Lock")
def handle_unlock():
print("Unlock")
import os
from gi.repository import GLib, Gio
# ---
def handle_lock():
print("Lock")
def handle_unlock():
print("Unlock")
@heftig
heftig / test.c
Last active August 29, 2015 14:28 — forked from Gikoskos/test.c
memory problem in C
#include <unistd.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
char *foo2 ()
{
return "FOO";
}
# EVEMU 1.2
# Input device name: "SynPS/2 Synaptics TouchPad"
# Input device ID: bus 0x11 vendor 0x02 product 0x07 version 0x1b1
# Supported events:
# Event type 0 (EV_SYN)
# Event code 0 (SYN_REPORT)
# Event code 1 (SYN_CONFIG)
# Event code 2 (SYN_MT_REPORT)
# Event code 3 (SYN_DROPPED)
# Event code 4 ((null))
Jul 17 04:08:49 philomeena systemd-bus-proxyd[667]: Dropped unmatched broadcast: uid=120 gid=120 message=signal path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameOwnerChanged
Jul 17 04:08:52 philomeena systemd-bus-proxyd[667]: Dropped unmatched broadcast: uid=120 gid=120 message=signal path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameOwnerChanged
Jul 17 04:08:52 philomeena systemd-bus-proxyd[667]: Dropped unmatched broadcast: uid=120 gid=120 message=signal path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameOwnerChanged
Jul 17 04:08:52 philomeena systemd-bus-proxyd[992]: Dropped unmatched broadcast: uid=1000 gid=1000 message=signal path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameOwnerChanged
Jul 17 04:08:52 philomeena systemd-bus-proxyd[992]: Dropped unmatched broadcast: uid=1000 gid=1000 message=signal path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameOwnerChanged
Jul 17 04:08:52 philomeena systemd-bus-proxyd[992]
foo: screensaver-gdbus.c foo.c
$(CC) -Wall -Wextra -Wno-unused-parameter $(CFLAGS) -o $@ `pkg-config --cflags --libs glib-2.0 gio-2.0 gio-unix-2.0` $^
%-gdbus.c %-gdbus.h: %-dbus.xml
gdbus-codegen --interface-prefix org.gnome. --generate-c-code $*-gdbus --c-namespace Foo_DBus $<
screensaver-dbus.xml:
gdbus introspect -e -d org.gnome.ScreenSaver -o /org/gnome/ScreenSaver -x > $@
clean:
@heftig
heftig / code.rb
Last active August 29, 2015 14:14
def evaluate(expression)
stack = []
expression.split.each do |word|
case word
when "+"
stack << (stack.pop + stack.pop)
when "-"
arg1 = stack.pop
arg2 = stack.pop
### Keybase proof
I hereby claim:
* I am heftig on github.
* I am heftig (https://keybase.io/heftig) on keybase.
* I have a public key whose fingerprint is 8218 F888 49AA C522 E94C F470 A5E9 288C 4FA4 15FA
To claim this, I am signing this object: