Skip to content

Instantly share code, notes, and snippets.

View haliphax's full-sized avatar
💭
git clone self

haliphax

💭
git clone self
View GitHub Profile
@nicolaslegland
nicolaslegland / .fon renderer.htm
Last active June 29, 2023 07:53
FON renderer
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<meta content="initial-scale=1.0, width=device-width" name="viewport" />
<base href="https://gist.githubusercontent.com/nicolaslegland/2ace50f4bad628f6de67a97e03b0061c/raw/" />
<title>FON renderer</title>
<style>
@font-face
- 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)
import urllib.request
import re
EMOJI_TEST_FILENAME = "emoji-test.txt"
EMOJI_DATA_URL = "https://unicode.org/Public/emoji/14.0/emoji-test.txt"
def download_latest_emoji_test_data() :
response = urllib.request.urlopen(EMOJI_DATA_URL)
emoji_test_file = response.read()
with open(EMOJI_TEST_FILENAME, "wb") as tmp_file:
@myshov
myshov / function_invocation.js
Last active January 21, 2024 15:14
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@Changaco
Changaco / btrfs-undelete
Last active April 22, 2024 20:06
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo