Skip to content

Instantly share code, notes, and snippets.

View yasar11732's full-sized avatar

Yaşar Arabacı yasar11732

View GitHub Profile
@yasar11732
yasar11732 / main.c
Last active December 11, 2015 20:19
#include <stdio.h>
#include <stddef.h>
#include <X11/Xlib.h>
#include <assert.h>
#include <unistd.h>
#include <signal.h>
int working = 1;
structure(list(X...Country.Name = structure(c(226L, 226L, 1L,
1L, 2L, 2L, 3L, 3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L,
9L, 10L, 10L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L,
16L, 16L, 17L, 17L, 18L, 18L, 19L, 19L, 20L, 20L, 21L, 21L, 22L,
22L, 23L, 23L, 24L, 24L, 25L, 25L, 26L, 26L, 27L, 27L, 28L, 28L,
29L, 29L, 30L, 30L, 31L, 31L, 32L, 32L, 33L, 33L, 34L, 34L, 35L,
35L, 36L, 36L, 37L, 37L, 38L, 38L, 39L, 39L, 40L, 40L, 41L, 41L,
42L, 42L, 43L, 43L, 44L, 44L, 45L, 45L, 46L, 46L, 47L, 47L, 48L,
48L, 49L, 49L, 50L, 50L, 51L, 51L, 52L, 52L, 53L, 53L, 54L, 54L,
55L, 55L, 56L, 56L, 57L, 57L, 58L, 58L, 59L, 59L, 60L, 60L, 61L,
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/XInput2.h>
int main() {
/* Connect to the X server */
Display *dpy = XOpenDisplay(NULL);
/* XInput Extension available? */
@yasar11732
yasar11732 / theme.html
Last active December 11, 2015 21:09 — forked from soemarko/theme.html
<!-- Aşağıdaki satırları </head> tagından önce, temanızın html dosyasına ekleyin -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Kullanımı: sayfanıza şunu ekleyin <div class="gist">[gist URL]</div>
Örnek: <div class="gist">https://gist.github.com/1395926</div>
-->
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/XInput2.h>
#include <signal.h>
#include <assert.h>
int working = 1;
void signal_callback_handler(int signum) {
working = 0;
@yasar11732
yasar11732 / minimaltest.c
Last active December 11, 2015 21:39
I am getting XI_BadDevice no matter what I set device id to.
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/XInput2.h>
#include <signal.h>
int main() {
Display *dpy = XOpenDisplay(NULL);
/* XInput Extension available? */
#include <stdio.h>
#include <stddef.h>
#include <X11/Xlib.h>
#include <assert.h>
#include <unistd.h>
#include <signal.h>
int working = 1;
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/XInput2.h>
#include <signal.h>
#include <unistd.h>
FILE *f;
int working = 1;
/* Includes were here */
/* This functions recieves XI_RawButtonPress event */
void handle_raw_event(XIRawEvent *ev) {
if(ev->detail == 1) {/* I am only interested in left button clicks */
printf("%u\n",time(NULL));
int i;
for(i=0; i< ev->valuators.mask_len * 8; i++) {
if(XIMaskIsSet(ev->valuators.mask,i)) {printf("Mask %d is set.\n",i);}
@yasar11732
yasar11732 / myclicks
Last active December 11, 2015 23:28
1359486659
1359486664
1359486666
1359486666
1359486667
1359486669
1359486669
1359486679
1359486702
1359486703