Skip to content

Instantly share code, notes, and snippets.

View eivindingebrigtsen's full-sized avatar

Eivind Ingebrigtsen eivindingebrigtsen

View GitHub Profile
export NODE_PATH="/usr/local/lib/node"
export CLICOLOR=1
export LSCOLORS=dxbxcxcxFxexexfxfxadad
alias 'cd..'='cd ..'
alias 'gut'='git'
alias lf='ls -F'
alias la='ls -lahF'
alias log='git log --color'
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
(function(){
var arr = SB.data.storage.accounts['91002064265'].categorization.matches['80850'].transactions;
var ob = {};
var length = 0;
for(var a in arr){
if(arr[a] in ob){
console.error(arr[a], ob[arr[a]]);
}else{
var trx = SB.find.Transaction(arr[a]);
if(trx.accountNumber !== '91002064265'){
{economiesSummary: {
2: {
matchesByTime: {
"2010_01": {}
"2010_02": {}
},
totalBalance: 156315.18000000002,
totalDeposits: 232505,
totalWithdrawals: -76189.81999999999,
}
@eivindingebrigtsen
eivindingebrigtsen / app.js
Created October 5, 2011 10:22
Test server
var app = require('express').createServer();
app.get('/status/201', function(req, res){res.send(201);}); // Created
app.get('/status/202', function(req, res){res.send(202);}); // Accepted
app.get('/status/204', function(req, res){res.send(204);}); // No Content
app.get('/status/206', function(req, res){res.send(206);}); // Partial content
app.get('/status/301', function(req, res){res.send(301);}); // Moved permanently
app.get('/status/400', function(req, res){res.send(400);}); // Bad request
app.get('/status/401', function(req, res){res.send(401);}); // Unauthorized
app.get('/status/403', function(req, res){res.send(403);}); // Forbidden
app.get('/status/404', function(req, res){res.send(404);}); // Not found
@eivindingebrigtsen
eivindingebrigtsen / app.js
Created October 5, 2011 07:37
Express status code server
var app = require('express').createServer();
app.get('/status/201', function(req, res){res.send(201);}); // Created
app.get('/status/202', function(req, res){res.send(202);}); // Accepted
app.get('/status/204', function(req, res){res.send(204);}); // No Content
app.get('/status/206', function(req, res){res.send(206);}); // Partial content
app.get('/status/301', function(req, res){res.send(301);}); // Moved permanently
app.get('/status/400', function(req, res){res.send(400);}); // Bad request
app.get('/status/401', function(req, res){res.send(401);}); // Unauthorized
app.get('/status/403', function(req, res){res.send(403);}); // Forbidden
app.get('/status/404', function(req, res){res.send(404);}); // Not found
@eivindingebrigtsen
eivindingebrigtsen / Rakefile
Created October 5, 2011 05:53
Raketask for taking mustache files into a js-file
PATH = 'js/tmpl';
desc "make mustache templates"
task :mustache do
src = 'SB.extend({templates: {';
length = Dir[PATH+'/*.mustache'].length;
Dir[PATH+'/*.mustache'].each do |f|
file = File.open(f, 'rb').read();
file.gsub!(/\n|\r|\t|\s\s/, '')
src += '"'+File.basename(f).gsub(/\.mustache/, '')+ '"' + " : '" + file + "',";
{"Safari5":{"id":"Safari5", "ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1", "device": "computer", "touch": false},, "Firefox4":{"id":"Firefox4", "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", "device": "computer", "touch": false},, "Firefox4":{"id":"Firefox4", "ua": "Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", "device": "computer", "touch": false},, "Chrome10":{"id":"Chrome10", "ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.618.0 Safari/534.16", "device": "computer", "touch": false},, "Chrome11":{"id":"Chrome11", "ua": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24", "device": "computer", "touch": false},, "Opera11":{"id":"Opera11", "ua": "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.7; U; en) Presto/2.8.131 Version/11.10", "device"
{
"id": "Safari5",
"ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1",
"device": "computer",
"touch": false
}, {
"id": "Firefox4",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
"device": "computer",
"touch": false
{
"id": "Safari5",
"ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1",
"device": "computer",
"touch": false
}, {
"id": "Firefox4",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
"device": "computer",
"touch": false
3297 [main] ERROR org.mortbay.log - Failed startup of context storebrand.felles.web.STBWebAppContext@1b6c184{/stb-rest-api,C:\developer\eclipse-workspaces\REST\trunk\.\src\main\webapp}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storebrand.portaler.personportalen.services.events.SpringEventDispatcher#0' defined in class path resource [spring-config/pp/personportalen-core-beans.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#