Skip to content

Instantly share code, notes, and snippets.

@facultymatt
facultymatt / roles_invesitgation.md
Last active April 16, 2024 09:31
Roles and permissions system for Nodejs
@ryanwilsonperkin
ryanwilsonperkin / react_links.md
Last active May 25, 2018 00:39
Useful links for those new to the react ecosystem
@gajus
gajus / wm.js
Last active March 12, 2018 14:44
let doFoo = new WeakMap(),
doBar = new WeakMap();
class Foo {
constructor () {
doFoo.set(this, () => {
// definition of doFoo for the instance of Foo.
});
doBar.set(this, () => {
@thiloplanz
thiloplanz / Zero_knowledge_db.md
Last active July 15, 2024 11:26
Zero-knowledge databases

Zero knowledge databases

The idea

The idea is to provide a database as a service to end users in such a way that no one except the user herself can access the data, not even the hosting provider or the database administrator.

Advantages

  • A privacy- and/or security-conscious user will have more trust in such a setup.
  • The service provider cannot be coerced to release the data they were trusted with, and he cannot be held responsible for the content he is storing.
<!-- START: Livefyre Embed -->
<div id="livefyre-comments"></div>
<script type="text/javascript" src="http://zor.livefyre.com/wjs/v3.0/javascripts/livefyre.js"></script>
<script type="text/javascript">
(function () {
var articleId = fyre.conv.load.makeArticleId(null);
fyre.conv.load({}, [{
el: 'livefyre-comments',
network: "livefyre.com",
siteId: "379401",

GraphQL-LD

GraphQL-LD is a way to query Linked Data using GraphQL.

Instead of querying GraphQL interfaces, Linked Data interfaces are queried, such as SPARQL endpoints, TPF interfaces, Linked Data documents, ... This is done by semantifying GraphQL queries using a JSON-LD context.

Try it out from your browser: http://query.linkeddatafragments.org/

Alternatively, install GraphQL-LD or Comunica SPARQL and execute GraphQL-LD queries on your machine

@bmaupin
bmaupin / open-source-sso.md
Last active June 18, 2024 21:40
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes
@shahidhk
shahidhk / product_table_with_jsonb.sql
Last active August 3, 2021 22:48
An indicative product table with JSONB column for specs
CREATE TABLE product (
uuid UUID NOT NULL DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
price NUMERIC NOT NULL,
spec JSONB NOT NULL,
PRIMARY KEY (uuid)
);
@mks-d
mks-d / bahrain_ah.csv
Last active May 7, 2024 06:12
Bahrain address hierarchy: 'Governorate', 'Place', 'Block'
Southern Aáli 746
Southern Aáli 748
Southern Al Door 965
Southern Algainah 961
Southern Al Hajyat 929
Southern Al Hajyat 931
Southern Al Hajyat 935
Southern Al Hajyat 939
Southern Al Hunaniya 901
Southern Al Hunaniya 903
Operator Postgres equivalent Description
_contains @> Does the column value contains these key-value pairs at top-level?
_contained_in <@ Is the column value contained in this JSON object at top-level?
_has_key ? Does the string exist as a top-level key within the JSON value?
_has_keys_any ?| Do any of these array strings exist as top-level keys?
_has_keys_all ?&amp; Do all of these array strings exist as top-level keys?