Skip to content

Instantly share code, notes, and snippets.

View dscape's full-sized avatar

Nuno Job dscape

View GitHub Profile
@dscape
dscape / The-Innovators-Dilemma-Summary.md
Created February 22, 2011 21:02
Notes on The Innovator’s Dilemma: When New Technologies Cause Great Firms to Fail

Notes on The Innovator’s Dilemma: When New Technologies Cause Great Firms to Fail

  • Book by: Clayton M. Christensen, Cambridge, Massachusetts: Harvard Business School Press, 1997
  • Prepared by: B.B. McBreen. See [PDF][1] (more readable but it's not plain text)

Summary

  1. Market progress is separate from technology progress. Customers do not always know what they need.
  2. Innovation requires resource allocation which is extraordinarily difficult for disruptive technologies.
  3. Disruptive technology needs a new market. Old customers are less relevant. Disruptive technology is a marketing problem, not a technological one.
var url_parts = url.parse(req.url, true);
var query1 = url_parts.query;
// Build the post string from an object
var query=querystring.stringify(query1);
var post_options = {
host: 'steamcommunity.com',
port: '443',
@dscape
dscape / create-xml-from-list-of-xpath-value-pairs.xqy
Created April 13, 2010 06:01
Generate XML out of XPath Expressions
import module namespace mem = "http://xqdev.com/in-mem-update"
at "/MarkLogic/appservices/utils/in-mem-update.xqy" ;
declare variable $DEBUG as xs:boolean := fn:true() ;
(: hack because the inmem update looses the right focus
: if you have an idea on a workaround, please let me know
:)
declare variable $redo as xs:string* := ();
(: functional ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::)
var oauth = require('oauth')
, request = require('request')
;
module.exports = function(app, params, cb) {
if(!params.consumer_key) { throw new Error('Please provide a consumer key.'); }
if(!params.consumer_secret) { throw new Error('Please provide a consumer secret.'); }
if(!params.callback_url) { throw new Error('Please provide callback url.'); }
if(!cb) { throw new Error('Please provide a callback'); }

Lost in Recursion - Generate XML from name value pairs (HTML Form)

Meta

  • Pre-requisites

MarkLogic Server 4.2. Knowing your way around http://localhost:8001 or a working cq instalation

  • Difficulty: Medium
  • Keywords: XML, XForms, HTML, Forms, XQuery, Functional, Map, Fold, High Order Functions, Application Buider, Search, git, github, XQuery 1.1

Nuno Job

@dscape
dscape / stud
Last active January 5, 2016 23:49 — forked from ghcopy/stud
#!/bin/sh
### BEGIN INIT INFO
# Provides: stud
# Required-Start: $remote_fs $network $local_fs
# Required-Stop: $remote_fs $network $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The Scalable TLS Unwrapping Daemon
# Description: stud is a network proxy that terminates TLS/SSL
@dscape
dscape / README.md
Last active December 21, 2015 03:59 — forked from mbostock/.block
Throughput by varying write block size

Plot for the Sequential write to file exercise in UoT CS434

Each line represents a different file size:

  • 1MB (baseline)
  • 10MB
  • 50MB
  • 100MB

To see the rest of the work consult github/dscape

<html>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$.getJSON('http://localhost:3000/athlete/1', function(data) {
console.log(data);
});
</script>
</html>
@dscape
dscape / js-beautify-and-jshint-for-textmate2.command.sh
Last active December 20, 2015 17:29
A command that on save (command + s) runs the beautifier and then runs jshint according to your jshintrc. if there are jshint errors it adds a comment to shame you into submission. Requires this bundle to actually do the saving https://github.com/bomberstudios/Save-On-Focus-Lost.tmbundle
#!/usr/bin/env bash
#
# Ask the textmate guys?
#
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
#
# Name: reformat.js
# Author: @dscape
var request = require('request')
, location = process.argv[2]
;
if(!location) {
throw new Error('sad panda');
}
request(