Skip to content

Instantly share code, notes, and snippets.


Eirik Brandtzæg eirikb

  • Avento AS
  • Ålesund, Norway
View GitHub Profile
eirikb / dep.js
Created Jun 24, 2014
View dep.js
var d={a:1,b:2},f=function(a,b){return a+b};f.apply(null,(''+f).match(/function[^(]*\(([^)]*)\)/)[1].split(/,\s*/).map(function(x){return d[x]}))
eirikb / paging.html
Created Nov 16, 2014
SharePoint paging
View paging.html
<link rel="stylesheet" href="//">
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>
<div ng-app="test-paging" ng-controller="ListController">
<table class="table table-bordered">
<tr ng-repeat="item in items">
<td ng-bind-html="item.Body"></td>
View example.js
var nodify = require('nodify');
// Prints build time
console.log(nodify(function() {
return new Date();
// Prints current time
console.log(new Date());
View OpenBinaryDirect.cs
public static FileInformation GetFile(ClientContext clientContext, string fileRef)
using (var clientContextHack = new ClientContext(clientContext.Url))
return File.OpenBinaryDirect(clientContextHack, fileRef);
View browser.js
function fail() {
omg / lol;
$(function() {
DNode().connect(function(remote) {
remote.hello(function() {
View gist:1231414
git filter-branch -f --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "eirikb@heavyload" ];
GIT_COMMITTER_NAME="<Eirik Brandtzæg>";
GIT_AUTHOR_NAME="<Eirik Brandtzæg>";
git commit-tree "$@";
git commit-tree "$@";
View gist:1264580
$ mvn clojure:test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building comicparser 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] --- clojure-maven-plugin:1.3.4:test (default-cli) @ comicparser ---
Testing no.eirikb.comicparser.comicparser
View gist:1296912
"description":"DB2 Express-C 9.7.1 on Ubuntu 9.10 i386 - 20100407",
"description":"DB2 Express-C 9.7.1 running on Ubuntu 9.10. Built 2010-04-07",
View helloworld.lett
my.test-lib: {
a: 'hello',
b: 'world',
c: 1337,
t: true,
f: false,
inner.object: 'Works!',
my.very-inner.object: 7,
nesting-test: +(1 2 3 -(6 1)),
string-test: str('hello' ', ' 'world'),
View gist:1333699
[eirikb@eeeirik mineserver2]$ cmake .
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1197 (message):
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt:59 (FIND_PACKAGE)