Skip to content

Instantly share code, notes, and snippets.

@luaraneda
luaraneda / Makefile
Created April 17, 2016 21:03
Makefile to compile a single device-tree
# Makefile to compile a single device-tree
# Main .dts file without extension
MAIN_DTS_FILE:=sun6i-a31s-sinovoip-bpi-m2
# C preprocessor flags (for dts parsing)
DTS_CPP_FLAGS := -nostdinc -Iinclude -undef -D__DTS__ -x assembler-with-cpp
## Targets
@dabrahams
dabrahams / private_access.cpp
Created December 28, 2011 17:50
Accessing Private Data
#include <iostream>
// This is a rewrite and analysis of the technique in this article:
// http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html
// ------- Framework -------
// The little library required to work this magic
// Generate a static data member of type Tag::type in which to store
// the address of a private member. It is crucial that Tag does not
@hagino3000
hagino3000 / client.js
Created December 8, 2011 18:42
WebSocket with binary data
var socket = null;
function bootstrap() {
// 適当な図形を描画
var c = document.getElementById('mycanvas');
var ctx = c.getContext('2d');
ctx.globalalpha = 0.3;
for(var i=0; i<1000; i++) {
ctx.beginPath();