Skip to content

Instantly share code, notes, and snippets.

View begoat's full-sized avatar
Reading books help me know more about this world.

William begoat

Reading books help me know more about this world.
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](
- [link: Logseq docs - Advanced queries](
- [link: Logseq datascript schema](
- [link: Logseq frontend db model](
- [link: How to Graph Your Data - talk by Paula Gearon](
- [link: Domain modelling with datalog - talk by Norbert Wojtowicz](
- [link: Athens Research ClojureFam](
begoat / memorySizeOfObject.js
Created March 26, 2020 02:11
calculate memory size of javascript object, it is not a accurate value!
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if(obj !== null && obj !== undefined) {
switch(typeof obj) {
case 'number':
bytes += 8;
case 'string':
begoat / pre-commit-eslint
Created February 5, 2020 01:31 — forked from shettayyy/pre-commit-eslint
Pre-commit hook for Linting JS with ESLint before commit.
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint"
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
begoat /
Last active August 24, 2018 06:43 — forked from ciiiii/
python get time of one timezone
from datetime import datetime, timedelta
from pytz import timezone
begoat /
Created July 14, 2018 03:44 — forked from soarez/
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.