Skip to content

Instantly share code, notes, and snippets.

@wibblymat
wibblymat / test.c
Created August 27, 2016 15:09
Binaryen out of bounds memory access
void print(int);
void loop() {
for (int i = 0; i < 10; i++) {
print(i);
}
}
var label1 = new AdwordsLabels();
var label2 = new AdwordsLabels();
label1.Value = "first";
label2.Value = "second";
entry.AdwordsLabelsCollection.Add(label1);
entry.AdwordsLabelsCollection.Add(label2);
@wibblymat
wibblymat / plugins.md
Last active December 12, 2015 09:49
Discussion of possible plugin architecture for basket.js

#Plugins#

##Motivation##

We have had several requests to add support for different resource types to basket.js. I propose that rather than add new code paths for each resource type directly to the library, we instead provide the features necessary for consumers to provide their own extensions. This discussion covers the options available to us in providing these features along with any associated risks.

##Extending to other text-based resources##

The current model makes two important assumptions. The first is that the resource that is fetched is a text document. The second is that the resource represents a JavaScript file.

@wibblymat
wibblymat / clone.js
Last active December 10, 2015 21:59
ES5 object clone
var clone = function(original)
{
var copy = Object.create({});
Object.getOwnPropertyNames(original).forEach(function(name)
{
Object.defineProperty(copy, name, Object.getOwnPropertyDescriptor(original, name));
});
return copy;