Skip to content

Instantly share code, notes, and snippets.

View questsin's full-sized avatar

Nicholas Manolakos questsin

View GitHub Profile
@questsin
questsin / Evernote2Archi.xsl
Created June 28, 2012 01:28
Convert Evernote .enex file to Archi .archimate using XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:archimate="http://www.bolton.ac.uk/archimate" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
<xsl:output method="xml" media-type="text/xml"/>
<xsl:template match="/">
<archimate:model id="{generate-id()}" version="2.2.1" name="Evernote2Archi">
<folder type="business" id="{generate-id()}" name="Evernote2Archi">
<xsl:for-each select="/en-export/note">
<element id="{generate-id()}" xsi:type="archimate:Representation" name="{title}">
<documentation>
<xsl:value-of select="content"/>
@questsin
questsin / Archi2Evernote.xsl
Created June 28, 2012 01:33
Convert Archi .archimate to Evernote .enex file using XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" media-type="text/xml"/>
<xsl:template match="/">
<!--DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export.dtd"-->
<en-export export-date="20120625T142329Z" application="archimate" version="4.x">
<xsl:apply-templates/>
</en-export>
</xsl:template>
<xsl:template match="element">
<HTML><HEAD><TITLE>5kChess</TITLE>
<SCRIPT>
Y = document;
a = -1;
t = 1;
e = 0;
k = 0;
cm = 0;
p = new Array;
c = new Array;
var tb = document.getElementById("name");
tb.addEventListener("keypress",
function(event) {
console.log("Pressed!");
});
<!DOCTYPE html>
<html>
<head><title>blank</title></head>
<body>
</body>
</html>
'use strict';
console.log('Loading function');
const doc = require('dynamodb-doc');
const dynamo = new doc.DynamoDB();
/**
* Demonstrates a simple HTTP endpoint using API Gateway. You have full
* access to the request and response payload, including headers and
* status code.
* To scan a DynamoDB table, make a GET request with the TableName as a
* query string parameter. To put, update, or delete an item, make a POST,
const async = require('async');
var items = [1,2,3,4,5,6,7,8,10];
function callback(){
console.log("done");
}
// 1st para in async.each() is the array of items
async.each(items,
var AWSMqtt = require('aws-mqtt-client').AWSMqtt;
//Create an IAM role and asign predefined AWSIoTDataAccess policy
const mqttClient = new AWSMqtt({
accessKeyId: '',
secretAccessKey: '',
sessionToken: '',
endpointAddress: '',
region: 'eu-west-1'
<!DOCTYPE html>
<html>
<head><title>blank</title></head>
<body>
</body>
</html>
//LRU Cache
//https://github.com/monsur/jscache
//https://github.com/rsms/js-lru
//todo: transposition table, LRU Cache, WithMemory
//var Cache = new Object(); // or just {}
// show the values stored
//for (var k in Cache) {
// use hasOwnProperty to filter out keys from the Object.prototype
// if (Cache.hasOwnProperty(k)) {