Skip to content

Instantly share code, notes, and snippets.

View dscape's full-sized avatar

Nuno Job dscape

View GitHub Profile

SAUCE

heat up a little bit of olive oil with chopped onions. (almost all portuguese recipes start like this). when onions are golden add tomatoes (many) add 2 bay leaves, beer, one chili pepper (chopped for extra spicyness), a little meat or sausage for meat flavour, a knorr thingy (either chicken or beef according to what your cooking in the sandwich), and a little smell of a strong drink like whiskey, brandy, port or one you would think would fit. all sauce recipes are a bit different, because some people like different flavours, stronger or less strong, spicy or not so spicy. some like to add a little bit of seafood sauce, wich gives a slightly different taste but works fine for some people (im one of them) :P you have to look out for it not to be to liquid. thats where you could add the cornstarsh to mke it thicker. This provides a quick fix for not getting it right i suppose in terms of thickness.

PER SANDWICH

@dscape
dscape / coocurrence.xqy
Created March 23, 2011 14:29
Sample Co-occurence Index
for $c in cts:element-value-co-occurrences(
fn:QName("http://marklogic.com/MLU/top-songs", "genre"),
fn:QName("http://marklogic.com/MLU/top-songs", "artist")
, ("frequency-order",
"collation-1=http://marklogic.com/collation/en/S1/AS/T00BB",
"collation-2=http://marklogic.com/collation/en/S1/AS/T00BB"), cts:and-query(()))
return <i c="{cts:frequency($c)}">{
for $v in $c
return (attribute fst {fn:string($v//*:value[1])},
attribute snd {fn:string($v//*:value[2])})}</i>
@dscape
dscape / apr28.md
Created April 28, 2011 07:39
Meetup tomorrow

#sfodocdb drinks tomorrow.

Place: RickHouse - 246 Kearny St. SF, CA 94108 Time: 8PM

  • People: @csanz, @nitin, @janl, @dscape, @johndmitchell
  • Maybe: @mikeal, @jchris, @scissorjammer, @tilgovi, @hunterhacker
  • No: @hackingdata
@dscape
dscape / nodemailer-to-postmark.js
Created August 3, 2011 16:16
Make the postmark api look like node_mailer
var request = require('request')
, _ = require('underscore');
function send_mail(message, callback) {
if(typeof exports.SMTP.api_key !== "string") {
console.log(exports.SMTP)
callback(new Error("No API Key was given"));
return;
}
if(typeof exports.SMTP !== "object") {
(:: Configure script for the top-songs application ::)
(: forest :)
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $config := admin:forest-create(
$config,
"top-songs-01",
xdmp:host(),
())
@dscape
dscape / sup
Created September 20, 2011 12:04
Sensor updater
#!/bin/bash
# Sensor updater
# v0.1
echo "==> Updating sensor-tracking"
cd sensor-tracking
git pull origin
cd ..
@dscape
dscape / make-node.sh
Created November 9, 2011 00:06
Make nodejs with github.com kennethreitz osx-gcc-installer instead of xcode failing
dscape at air in ~/Desktop/node/node on (no branch)
$ ./configure
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : yes
new RegExp(
[
'<',
'(/?)', // 2 - is closing
'([-:\\w]+)', // 3 - name
'((?:\\s+[-\\w]+(?:', '=', '(?:' +
'\\w+|' +
'"[^"]*"|' +
'\'[^\']*\'))?)*)', // 4 - attributes
'(/?)', // 5 - is self-closing
@dscape
dscape / git-commit-prefixes
Created February 17, 2012 10:41 — forked from indexzero/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[merge]: Resolved git merge from upstream or otherwise
[refactor]: Refactor of existing code with no external API changes
function f() {
throw new Error('def');
}
process.on('uncaughtException', function(e) {
console.log('uncaught exception', e);
f();
});
f();