Skip to content

Instantly share code, notes, and snippets.

View bodokaiser's full-sized avatar
😀
Happy to be here!

Bodo Kaiser bodokaiser

😀
Happy to be here!
View GitHub Profile
@bodokaiser
bodokaiser / kqueue_file_stream.c
Created June 7, 2013 19:13
kqueue file read stream
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/event.h>
#define PATH "some.tmp"
@bodokaiser
bodokaiser / v8_object.cc
Created June 7, 2013 19:15
Example of a v8 object exported with node-gyp.
#include "v8.h"
#include "node.h"
using namespace v8;
Handle<Value> Get(const Arguments &args);
Handle<Value> Set(const Arguments &args);
void
Initialize(Handle<Object> exports) {
@bodokaiser
bodokaiser / README.md
Created June 12, 2013 06:33
How-To Install FreeBSD ARM on BeagleBone Black.

How-To Install FreeBSD ARM.

Following document covers installation guide for FreeBSD ARM.

Build Environment

First of all we need to set up a building environment. The building environment will compile the sources to the boards ARM architecture.

I hardly recommend to use FreeBSD as OS for building the ARM image.

@bodokaiser
bodokaiser / _http_common.js
Created June 14, 2013 18:53
Shows the use of joyent/http-parser
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
@bodokaiser
bodokaiser / libuv_fs.cc
Created June 15, 2013 16:16
Extracted from http://github.com/bodokaiser/node-libuv-fs - rebuilt of libuv v8 bindings.
#include "v8.h"
#include "node.h"
#include "node_buffer.h"
#include "req_wrap.h"
using namespace v8;
using node::Buffer;
using node::UVException;
using node::MakeCallback;
@bodokaiser
bodokaiser / native_rest_adapter.js
Last active December 18, 2015 22:59
Native REST Adapter for EmberData
(function(App) {
App.Adapter = DS.RESTAdapter.extend({
namespace: null,
serializer: DS.RESTSerializer.extend({
primaryKey: function() {
return '_id';
(function() {
var router = new Router().map(function() {
this.route('index', '/', indexRoute);
this.route('outputs', '/outputs', outputsRoute);
this.route('outputs:list', '/outputs/list', outputsListRoute);
this.route('outputs:create', '/outputs/create', outputsCreateRoute);
});
@bodokaiser
bodokaiser / README.md
Last active April 14, 2025 04:01
Guide How-To use Device Tree Overlays on Archlinux.

Device Tree Overlays on Archlinux

Dependencies

base-devel

You require a working archlinuxarm operarting system and the development tools:

$ pacman -S base-devel
@bodokaiser
bodokaiser / client.js
Created October 8, 2013 17:02
Reproduction of 3G WebSocket proxy bug. See too: http://stackoverflow.com/questions/5574385/websockets-on-ios
/**
* This will work as it should when testing over WiFi.
* However if you test this through 3G (or another proxy?) then we fail...
*/
var ws = new WebSocket('ws://yourdomain');
@bodokaiser
bodokaiser / list1.sql
Last active December 30, 2015 05:59
SQL videocenter.schule.de
#1
SELECT kunr, kuname, kuvorna, kustras, kuplz, kuort FROM kunden
#2
SELECT * FROM videos WHERE vititel LIKE 'A%'
#3
SELECT vititel, viart, vidauer FROM videos WHERE
vidauer < 30
AND