Skip to content

Instantly share code, notes, and snippets.

View mntmn's full-sized avatar

minute mntmn

View GitHub Profile
ds test
mov r8,r14
mov r0,#2
lsl r0,r0,#8
add r0,r0,#2
mov r4,#40
mov r2,#32
mov r11,r0
@mntmn
mntmn / mbp_retina_trackpad.md
Created November 10, 2013 19:02
Good setup for MacBook Pro Retina 13" trackpad in Linux/Xorg/X11 (Debian jessie for me). Handles resting thumb and thumb-click-indefinger-drag correctly. Also fixes jerk/jump on very small movements that ought to be precise.
  1. Use xf86-input-mtrack

Debian Jessie (w/ gnome3) uses the "synaptics" xf86 input module as a default. It is very precise but doesn't support "resting thumb" behaviour that you're used to from OSX.

xf86-input-mtrack is an enhancement of xf86-input-multitouch which is configurable. I built it from source from here: https://github.com/BlueDragonX/xf86-input-mtrack But i see that it's also in the debian package repo. So you probably only need to do:

sudo aptitude install xserver-xorg-input-mtrack

I created an override config in /etc/X11/xorg.conf.d/50-synaptics.conf (create the directory if it doesn't exist) which looks like this:

@mntmn
mntmn / gist:8049386
Created December 20, 2013 02:01
list of dependencies in urbit
Undefined symbols for architecture x86_64:
"___gmp_fprintf", referenced from:
__unix_dump in unix.o
"___gmp_fscanf", referenced from:
__unix_scan in unix.o
"___gmp_sprintf", referenced from:
__ho_mop_seal in host.o
"___gmpz_add", referenced from:
_j2_k_191__mood__hoon__add_mc in add.o
_j2_k_191__mood__hoon__add_m in add.o
@mntmn
mntmn / osx_framebuffer
Created December 21, 2013 15:49
probably the quickest way to draw pixels on OSX in C. catch: compiles only with -m32 (32 bit arch). :|
#include <Carbon/Carbon.h>
#include <CoreGraphics/CoreGraphics.h>
uint32_t framebuffer[FB_W*FB_H];
WindowRef osx_window;
CGContextRef osx_window_context;
CGContextRef osx_bitmap_context;
void updateFrameBuffer() {
(ql:quickload "ningle")
(ql:quickload "cl-mongo")
(use-package 'cl-mongo)
(db.use "test")
(defvar *collections*
(list
(list "pages" "title" "content")
(list "products" "title" "content" "price")
(list "news_items" "date" "author" "content")))
@ dumps memory. r1: address
print_memory:
push {r0-r6}
ldr r6, =uart0
ldr r6, [r6]
mov r5, r1 @ store memory begin address
mov r1, #'\n'
strb r1, [r6]
irata:home-lisp mntmn$ ./a.out
plus: (+.<tag:3>)
globals: ((foo.123).((+.<tag:3>).nil))
evaluating t1: (+.(42.(23.nil)))
lookup expr: +
in env : ((foo.123).((+.<tag:3>).nil))
found lambda for +:
<tag:3>
(def ofs 0)
(def sofs 0)
(def x 0)
(def y 0)
(def x1 0)
(def x2 0)
(def x3 0)
(def y1 0)
(def y2 0)
(def sy 0)
@mntmn
mntmn / vga.v
Created January 27, 2016 08:48
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: MNT Media & Technology UG
// Engineer: Lukas F. Hartmann
//
// Create Date: 01:44:12 05/03/2015
// Design Name:
// Module Name: vga
// Project Name:
// Target Devices:
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: MNT Media & Technology UG
// Engineer: Lukas F. Hartmann
//
// Create Date: 01:44:12 05/03/2015
// Design Name:
// Module Name: vga
// Project Name:
// Target Devices: