Skip to content

Instantly share code, notes, and snippets.

View eedeebee's full-sized avatar

Eric Bloch eedeebee

  • Hillsborough, CA
View GitHub Profile
@eedeebee
eedeebee / manifest.json
Created March 29, 2022 20:06 — forked from greatghoul/manifest.json
Chrome Extension Sample - detect if an extension is installed.
{
"name": "Detect if an extension installed",
"description": "Detect if an extension installed",
"version": "0.1",
"manifest_version": 2,
"permissions": [
"management"
],
"browser_action": {
"default_popup": "popup.html"
// ==UserScript==
// @name Trello Lists Show Num Cards
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match https://trello.com/b/*
// @copyright 2012+, You
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js
// ==/UserScript==
setTimeout(function() {
for $speech in (doc()//SPEECH)[1 to 100]
let $speaker := $speech/SPEAKER
let $lines := $speech/LINE
return (
<h2>{$speaker/text()}</h2>,
<p>{for $line in $lines return $line/text()}</p>
)
{
"options": {
"debug": false,
"transform-results": {
"apply": "raw"
},
"constraint": [{
"name": "stars",
"range": {
"type": "xs:int",
@eedeebee
eedeebee / 0_reuse_code.js
Created December 18, 2013 00:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
xquery version "1.0-ml";
declare variable $deck-counter := map:map();
declare variable $deck := map:map();
declare function local:get-card($num) {
let $card := map:get($deck-counter, xs:string($num))
let $_ := xdmp:log(fn:concat("card: ", $card, " $num: ", $num), "debug")
return
(: call recursively with another rand number, if the
xquery version "1.0-ml";
(: Copyright 2002-2010 Mark Logic Corporation. All Rights Reserved. :)
declare namespace feed = "http://marklogic.com/extension/plugin/feed";
import module namespace plugin = "http://marklogic.com/extension/plugin" at "/MarkLogic/plugin/plugin.xqy";
import module namespace info="http://marklogic.com/appservices/infostudio" at "/MarkLogic/appservices/infostudio/info.xqy";
import module namespace infodev="http://marklogic.com/appservices/infostudio/dev" at "/MarkLogic/appservices/infostudio/infodev.xqy";
<xsl:variable name="comments-for-post"
select="ml:comments-for-post(base-uri(.))"/>
<xdmp:import-module href="/model/data-access.xqy"
namespace="http://developer.marklogic.com/site/internal"/>
<xsl:copy-of select="xdmp:invoke('twitter.xqy')"/>