Skip to content

Instantly share code, notes, and snippets.

@pose
pose / brConv.d
Created January 1, 2017 20:31 — forked from Tomfox91/brConv.d
Converter for .BR3, .BR4, .BR5 files produced by BMW music backups. Simply negates all bites. See http://www.1erforum.de/hifi-navi/konvertieren-von-br4-br5-mp3-22678.html.
import std.file;
int main(char[][] args) {
if (args.length != 2) return 101;
auto filename = args[1];
auto basename = filename[0 .. $-4];
auto extension = filename[$-3 .. $];
if (!exists(filename)) return 102;
@pose
pose / keybase.md
Created June 5, 2015 17:45
keybase.md

Keybase proof

I hereby claim:

  • I am pose on github.
  • I am pose (https://keybase.io/pose) on keybase.
  • I have a public key whose fingerprint is BB67 70B1 07E4 6D1F 01E1 8EE6 3599 D355 F9CE AF3A

To claim this, I am signing this object:

@pose
pose / blacklist-proxy.js
Last active August 29, 2015 14:21
Reverse proxy with domain blacklist (Node.js)
// The MIT License (MIT)
// Copyright (c) 2015 Alberto Pose <albertopose@gmail.com>
var http = require('http');
var net = require('net');
var httpProxy = require('http-proxy');
var url = require('url');
var proxy = httpProxy.createServer();
@pose
pose / constructor.coffee
Last active December 27, 2015 00:39
Elegancy in Coffeescript
five = new Leaf(5)
node = new Node(new Leaf(2))
node2 = new Node(new Node(new Leaf(1)))
# [Function: Leaf]
five.constructor
# [Function: Node]
node.constructor
@pose
pose / consumer.js
Last active December 26, 2015 20:19
Pseudo-inheritance in JS
angular.module('otherModule', ['myModule'])
.factory('consumer', function (myClass) {
var instance1 = myClass(),
instance2 = myClass(),
instance3 = myClass();
}})
@pose
pose / myApp.js
Last active December 25, 2015 02:48
Code snippets of the following jsfiddle: http://jsfiddle.net/pose/N4Up7/
angular.module('myApp', [])
.factory('greeter', function () {
return 'Hello';
})
.factory('worldGreeter', function (greeter) {
return greeter + ' World';
});
@pose
pose / pom.xml
Created September 25, 2013 18:33
NPM Maven Plugin (part2)
<plugin>
<groupId>org.mule.tools.javascript</groupId>
<artifactId>npm-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>fetch-modules</goal>
</goals>
@pose
pose / pom.xml
Last active December 23, 2015 22:29
NPM Maven Plugin (part1)
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Repository</name>
<url>https://repository.mulesoft.org/releases/</url>
</repository>
@pose
pose / myApp.js
Created September 24, 2013 18:44
AngularJS: Using decorators for unit testing (part1)
angular.module('myApp', [])
.factory('parent', function () {
return 'Hello';
})
.factory('child', function (parent) {
return parent + ' World';
});
@pose
pose / docs.md
Last active December 16, 2015 22:19
Milo Docs

#Milo

Introduction

What is Milo?

Milo is a persistence layer abstraction build to be compatible to Ember.js. It is supposed to be used to persist and retrieve data to and from RESTful services.

Retrieving simple entities