Skip to content

Instantly share code, notes, and snippets.

View lethean's full-sized avatar
🎯
Focusing

Sunjin Yang lethean

🎯
Focusing
View GitHub Profile
@lethean
lethean / timechange.c
Created February 16, 2015 14:13
Detect time change with timerfd_settime() in Linux.
#include <stdio.h>
#include <sys/timerfd.h>
#include <sys/timerfd.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h> /* Definition of uint64_t */
#ifndef TFD_TIMER_CANCEL_ON_SET
@lethean
lethean / README.md
Last active August 29, 2015 14:15
EGL + X11 on Raspberry Pi... and incompleted Cogl patch...

Hacking libEGL.so on Rasberry Pi

It must be hacked to use EGL with X11 on Rasberry Pi.

Copy x11-hack-libegl.sh file to Rasberry Pi.

Type in terminal:

$ sudo sh x11-hack-libegl.sh
@lethean
lethean / ethcom.c
Created February 10, 2015 03:33
Send / Receive raw Ethernet frames with custom EtherType in Linux
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
vim: set autoindent expandtab shiftwidth=2 softtabstop=2 tabstop=2: */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/types.h>
#include <sys/socket.h>