Skip to content

Instantly share code, notes, and snippets.

View dscape's full-sized avatar

Nuno Job dscape

View GitHub Profile
@dscape
dscape / ghcopy.txt
Created May 16, 2014 10:52
gist created by github.com/dscape/ghcopy
fffoo
fffd
sddssdsd
dssdsd
sdsdsd
@dscape
dscape / designer.html
Created July 25, 2014 16:39
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-progress/paper-progress.html">
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="my-element">
<template>
<style>
@dscape
dscape / books.txt
Last active August 29, 2015 14:04
Books for the YLD Office
Predictably Irrational: The Hidden Forces that Shape Our Decisions
Quiet: The power of introverts in a world that can't stop talking
Business Adventures
Zero to One
Beyond Budgeting
Winning Decisions: Getting It Right the First Time
Creativity Inc
Good to Great
Surviving & Thriving in a Relationship with an Entrepreneur
First, Break All the Rules
```
Section Time Easy Medium Hard
Trial 3m ✔ ✔ ✔
JS 15m ✔ ✔ ✔ ✔ ✗ ✗ ✗ ✗ ✗ ✗ ✗ ✗
Node 15m ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
Modules 10m ✗ ✗ ✗ ✗ ✗ ✗
npm 6m ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
Command Line 5m ✗ ✗ ✗ ✗ ✗ ✗
Apps 15m ✔ ✔ ✔
```
@dscape
dscape / ghcopy.txt
Created August 15, 2014 08:51
gist created by github.com/dscape/ghcopy
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZe2jje7DAL11/Py4/7mFU8jZY4lkdJg0Ikbaq95nizHOqd23P1ONTlJ4OaLuunJSyoa9C4yWcznRCjgj0ZSZyhC+ySTN2aqudPENUksmzu15CxM8yEcs26OVQKqITG3qeBcKeDmyCAkuAWoehwzHfirVvCbBbIvDvbtjLiifCILxUjRxVz0kSJ6BARqWgdVBSI8c3GTm4q0vXp4M2P3Cyk08ZGj31oEsoYdFfPHG3lDgbmYtSVnwsrMK/ZByL6oufzO84Hk1B5KMMCOnjfsUknFZc5tn085T/A1ngkGOtxdoG/8OMchUcmjJfsVBTpy3shyuFUrOzNxipCin5oR5X dscape@air-2.local
@dscape
dscape / turkey.json
Last active August 29, 2015 14:05
gist created by github.com/dscape/ghcopy
{
"configuration": {
"resortCode": "turkey-any",
"ocupation": "2",
"departureDate": "20140101,20151212",
"duration": "7",
"boardBasis": "0",
"moreLinkUrl": "/srv-search/search?resortCode=turkey-any&occupation=&departureDate=20140101%2C20151212&duration=7&sort=&boardType=&"
},
"papiSearchResults": [
function foo(obj) {
var keys = [];
keys.push(object.name + '@' + obj.version);
for (var key in obj) {
if (key === 'dependencies' && typeof obj[key] === 'object')
keys.push(foo(obj[key]));
}
}
return keys;
}
function XHConn()
{
var xmlhttp, bComplete = false;
try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { try { xmlhttp = new XMLHttpRequest(); }
catch (e) { xmlhttp = false; }}}
if (!xmlhttp) return null;
this.connect = function(sURL, sMethod, sVars, fnDone)
{
@dscape
dscape / 01-cts:highlight.xq
Created March 24, 2010 23:42
Introduction to Alerting
let $doc :=
<root>
<a> It starts with hello and ends with goodbye. </a>
</root>
return
cts:highlight( $doc, cts:and-query(("hello", "goodbye")),
if (cts:word-query-text($cts:queries) eq "hello")
then (<font color="blue">{$cts:text}</font>)
else (<font color="red">{$cts:text}</font>))
@dscape
dscape / 01-refactoring-search.xq
Created March 25, 2010 13:06
Search, Updates and Range Indexes
declare namespace ts="http://marklogic.com/MLU/top-songs";
declare function local:build-query($text as xs:string) {
cts:or-query((
cts:word-query($text, (), 1),
cts:element-word-query(
xs:QName("ts:title"), $text, (), 2 ))) } ;
declare function local:search-rating($song) {
cts:score($song)