Skip to content

Instantly share code, notes, and snippets.

View mbohun's full-sized avatar
🙃
How do you do?

Martin Bohun Hormann mbohun

🙃
How do you do?
  • Canberra, ACT, Australia
View GitHub Profile
@mbohun
mbohun / gist:4214729
Created December 5, 2012 11:00
doc/test.arbvp
!!ARBvp1.0
# Taken from:
# http://www.opengl.org/registry/specs/ARB/vertex_program.txt (see 73)
#
ATTRIB iPos = vertex.position;
ATTRIB iNormal = vertex.normal;
PARAM mvinv[4] = { state.matrix.modelview.invtrans };
PARAM mvp[4] = { state.matrix.mvp };
PARAM lightDir = state.light[0].position;
@mbohun
mbohun / gist:4230526
Last active October 13, 2015 17:28
bzr-to-git_export
# martin@yobbo:/tmp$ cat ~/src/bzr-to-git_export.out
# setup:
# - install bzr & bzrtools from http://bazaar.canonical.com
# - install bzr-fastimport plugin from http://wiki.bazaar.canonical.com/BzrFastImport
# to your bazaar plugins dir, example: /home/martin/.bazaar/plugins/fastimport
# (i used: bzr-fastimport-0.13.0.tar.gz)
#
# create a new git repo (repo.git) that will be used to import your bzr repo (repo.bzr)
#
<html>
<head>
<!-- 1. include the library -->
<script type="text/javascript" src="visualization-monitor.js" />
</head>
<body>
<!-- 2. use it -->
<canvas data-visualization-monitor="ws://192.168.0.8" theme="simple" width="320" height="200"></canvas>
</body>
</html>
@mbohun
mbohun / gist:4263981
Created December 12, 2012 01:11
NETGEAR USB wifi card, ar9170usb, ar9170.fw
  • switched off the build in wireless (physically switched off, then dhcpcd -k eth1; pkill -9 wpa_supplicant)
  • copied the firmware (ar9170.fw) for the NETGEAR USB wifi card to /lib/firmware directory
  • plugged in the NETGEAR USB wifi card
usb 1-7: new high speed USB device using ehci_hcd and address 7
usb 1-7: New USB device found, idVendor=0846, idProduct=9010
usb 1-7: New USB device strings: Mfr=16, Product=32, SerialNumber=48
usb 1-7: Product: USB2.0 WLAN
usb 1-7: Manufacturer: ATHER
#!/bin/sh
#
#
IPT="/usr/local/sbin/iptables"
SSH_HOSTS_ALLOWED="11.11.11.11/16 22.22.22.22/24 33.33.33.0/16 44.44.44.44/24 55.55.55.55/16"
case "$1" in
start)
#/sbin/sysctl -w net.ipv4.ip_forward=1
@mbohun
mbohun / gist:4460018
Created January 5, 2013 05:52
defines all the different opengl vector and matrix types in a page of code
#ifndef VEC_H_INCLUDED
#define VEC_H_INCLUDED
#include <stdbool.h>
#define VEC_H_DEF2(T) T x; T y;
#define VEC_H_DEF3(T) VEC_H_DEF2(T) T z;
#define VEC_H_DEF4(T) VEC_H_DEF3(T) T w;
#define VEC_H_DEF(P, NAME, T, N) \
@mbohun
mbohun / gist:4631996
Created January 25, 2013 05:27
ARBvp1.0 simple
!!ARBvp1.0
PARAM mvp[4] = { state.matrix.mvp };
DP4 result.position.x, mvp[0], vertex.position;
DP4 result.position.y, mvp[1], vertex.position;
DP4 result.position.z, mvp[2], vertex.position;
DP4 result.position.w, mvp[3], vertex.position;
MOV result.texcoord[0], vertex.texcoord[0];
@mbohun
mbohun / gist:4696287
Last active December 12, 2015 02:08
test ===
#include <cstdlib> //for strtol
#include <iostream>
#include <sstream>
#include <string>
#include <boost/asio.hpp>
#include <boost/chrono.hpp>
#include <boost/thread.hpp>
#include <boost/thread/mutex.hpp>
#include "fifo.h"
<html>
<head>
<title>test udp_mon</title>
<meta charset="utf-8" />
</head>
<body>
<canvas id="udp_packets" width="400" height="200" data-test="blah"></canvas>
<br/>
@mbohun
mbohun / gist:5062440
Last active December 14, 2015 09:08
kernel 3.8.0 config-s diff
[martin@firewolf linux]$ diff .config.old .config
53c53
< CONFIG_LOCALVERSION="-04"
---
> CONFIG_LOCALVERSION="-06"
129,130c129,132
< # CONFIG_RCU_BOOST is not set
< # CONFIG_RCU_NOCB_CPU is not set
---
> CONFIG_RCU_BOOST=y