Skip to content

Instantly share code, notes, and snippets.

View fullofcaffeine's full-sized avatar

Marcelo Serpa fullofcaffeine

View GitHub Profile
- This page is a collection of some of the Advanced queries from the [[Datalog]] channel on the [[Logseq/Discord]] server. #datalog
id:: 61db13f4-75e8-4f87-ad60-3ac3479c5fc8
- ### Resources
- [link: The first message on the datalog channel](https://discord.com/channels/725182569297215569/743139225746145311/743139795865174119)
- [link: Logseq docs - Advanced queries](https://docs.logseq.com/#/page/advanced%20queries)
- [link: Logseq datascript schema](https://gist.github.com/tiensonqin/9a40575827f8f63eec54432443ecb929)
- [link: Logseq frontend db model](https://github.com/logseq/logseq/blob/master/src/main/frontend/db/model.cljs)
- [link: How to Graph Your Data - talk by Paula Gearon](https://youtu.be/tbVwmFBnfo4)
- [link: Domain modelling with datalog - talk by Norbert Wojtowicz](https://youtu.be/oo-7mN9WXTw)
- [link: Athens Research ClojureFam](https://github.com/athensresearch/ClojureFam)
@carestad
carestad / github-app-jwt.sh
Last active August 24, 2023 10:31
Script to generate JWT for use with Github apps
#!/usr/bin/env bash
# Generate JWT for Github App
#
# Inspired by implementation by Will Haley at:
# http://willhaley.com/blog/generate-jwt-with-bash/
# From:
# https://stackoverflow.com/questions/46657001/how-do-you-create-an-rs256-jwt-assertion-with-bash-shell-scripting
thisdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@cambiata
cambiata / MVCoconut MarkdownTools.hx
Last active May 29, 2019 09:29
Basic Haxe solution for creating MVCoconut RenderResult from markdown using https://github.com/dpeek/haxe-markdown
package tools;
import Markdown;
import markdown.AST;
import markdown.InlineParser;
class MarkdownTools {
/*
Example usage in a MVCoconut View:
import hx.strings.Char;
import hx.strings.StringBuilder;
using hx.strings.Strings;
class Slug {
static final SEPARATE = [
Char.BACKSPACE,
Char.TAB,
Char.LF,
Char.CR,
@postite
postite / MiniApp.hx
Created March 12, 2019 23:22
tink_web & coconut minimal
package minimal;
#if client
import tink.web.proxy.Remote;
import tink.url.Host;
import tink.http.clients.JsClient;
import tink.web.proxy.Remote.RemoteEndpoint;
import js.Browser.document as doc;
using tink.CoreApi;
import coconut.Ui.hxx;
@Matan
Matan / HaxeScript.hx
Last active February 5, 2022 12:27 — forked from clarkjones/HaxeScript.hx
haxex, a short shell script that can be used so you have Haxe shell scripting
#!/usr/bin/env haxex -lib mcli @
/**
Taken from mcli example https://github.com/waneck/mcli
Say hello.
Example inspired by ruby's "executable" lib example
**/
class HaxeScript extends mcli.CommandLine
{
/**
@miguelmota
miguelmota / webdriver_full_page_screenshots.js
Last active May 3, 2023 04:56
Selenium Webdriver Node.js take screenshots of entire page
var webdriver = require('selenium-webdriver')
var assert = require('assert')
var fs = require('fs')
// Input capabilities
var capabilities = {
'browserName' : 'Chrome',
'browser_version' : '66.0',
'os' : 'Windows',
'os_version' : '10',
@suuuehgi
suuuehgi / 001evaluation.svg
Created February 4, 2018 15:58 — forked from Artefact2/00considerations.md
Borg compression benchmark/comparison
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevinresol
kevinresol / Wiper.hx
Created January 20, 2018 02:37
Client side API Wiper for tink_web
package api;
// to use: add `implements api.Wiper` to your API class
// but it doesn't handle imports, either you use wildcard (import api.*) or guard them with `#if`
#if macro
import haxe.macro.Context;
using tink.MacroApi;
#end
@jdonaldson
jdonaldson / Config.hx
Last active May 24, 2019 17:34
Utility Classes for Haxe
using haxe.macro.Context;
import haxe.macro.Expr;
/**
Simple config merge routine. Supply a series of anonymous objects, and this macro will merge them into a single instance.
This is useful for providing a series of overrides for config, so I've gone with that name.
The benefit is that the macro preserves all of the typing info, so you still get completions, etc. on the merged object.
**/
class Config {
public static macro function merge<T>(arr : Array<ExprOf<T>>) : Expr {