Skip to content

Instantly share code, notes, and snippets.

View magcius's full-sized avatar
🐬
it's a dAmN cOld NiGhT tryin 2 figure out this life

Jasper St. Pierre magcius

🐬
it's a dAmN cOld NiGhT tryin 2 figure out this life
View GitHub Profile
@magcius
magcius / drawinbuffer.c
Created August 13, 2012 19:54
Draw in a buffer we created ourselves
/* gcc -o drawinbuffer drawinbuffer.c $(pkg-config --cflags --libs glib-2.0 libdrm) */
#include <glib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <assert.h>
#include <fcntl.h>
#include <string.h>
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#define w 1920
#define h 1080
@magcius
magcius / abort.c
Last active November 7, 2016 21:36
/*_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
*+ Status
*
* Copyright(C) 2010 SUZAK Inc. All Rights Reserved.
*
* project name:アボート制御
* source name:src/Abort.c
* data model:ILP32
* make:uno
@magcius
magcius / main.py
Created September 18, 2010 04:44
#
# main.py
#
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may redistribute it and/or modify it under the terms of the
# GNU General Public License, as published by the Free Software
{% for class_ in formatter.get_class_hierarchy(node) %}
<item>
<code>{{ class_.namespace.name }}.{{ class_.name }</code>
{% endfor %}
{% for class_ in formatter.get_class_hierarchy(node) %}
</item>
{% endfor %}
var BYTE_LENGTHS = {
'y': 1,
'n': 2,
'q': 2,
'i': 4,
'u': 4,
'h': 4,
'x': 8,
't': 8,
class Foo(object):
def __init__(self, what):
self.what = what
def butts(self):
def inner_butts(self, t):
if t == 0:
return self.what
else:
@magcius
magcius / -
Created November 4, 2015 00:31
--- hexagon-broken.html 2015-11-03 16:29:36.873741732 -0800
+++ hexagon-working.html 2015-11-03 16:31:31.897167298 -0800
@@ -3,7 +3,7 @@
<th colspan="2" style="text-align:center;font-size:125%;font-weight:bold;background:#e7dcc3;">Regular hexagon</th>
</tr>
<tr>
-<td colspan="2" style="text-align:center"><a href="https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Regular_polygon_6_annotated.svg/220px-Regular_polygon_6_annotated.svg.png" class="image" data-soma-widget="ImageLink"><img alt="Regular polygon 6 annotated.svg" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Regular_polygon_6_annotated.svg/220px-Regular_polygon_6_annotated.svg.png" width="220" height="225" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/38/Regular_polygon_6_annotated.svg/330px-Regular_polygon_6_annotated.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/38/Regular_polygon_6_annotated.svg/440px-Regular_polygon_6_annotated.svg.png 2x" data-file-width="503" data-file-height="515" data-soma
@magcius
magcius / -
Created October 19, 2015 20:37
From 80a843db21ecda9666cd8fb18a185517fbf7ebaf Mon Sep 17 00:00:00 2001
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
Date: Wed, 30 Sep 2015 15:04:33 -0700
Subject: [PATCH] drm/meson: Add back 1x scaling modes
---
drivers/gpu/drm/meson/meson_cvbs.c | 25 +++++++++++++++++++------
drivers/gpu/drm/meson/meson_cvbs.h | 3 ++-
drivers/gpu/drm/meson/meson_drv.c | 32 ++++++++++++++++++++------------
drivers/gpu/drm/meson/meson_modes.c | 5 +++++
@magcius
magcius / -
Created October 16, 2015 21:19
From c47f6ccd7b5cf1d5bc51ef7bc40af016f2524ccb Mon Sep 17 00:00:00 2001
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
Date: Wed, 30 Sep 2015 15:04:33 -0700
Subject: [PATCH] drm/meson: Add back 1x scaling modes
---
drivers/gpu/drm/meson/meson_modes.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/meson/meson_modes.c b/drivers/gpu/drm/meson/meson_modes.c