Skip to content

Instantly share code, notes, and snippets.

@GavinRay97
GavinRay97 / index.md
Last active April 12, 2024 18:31
Hasura organization permissions

Introduction

This document outlines how to model a common organization-based permission system in Hasura. Let's assume that you have some table structure like the following:

Table Name Columns Foreign Keys
User id, name, email
Organization User id, user_id, organization_id user_id -> user.id, organization_id -> organization.id
Organization id, name
#!/bin/sh
#--- Tested in Centos 7 ---#
#--- should run with sudo privileges ---#
GIT_VERSION=2.21.0
yum -y groupinstall "Development Tools"
yum -y install zlib-devel
yum -y install curl-devel
wget https://github.com/git/git/archive/v$GIT_VERSION.tar.gz -O git.tar.gz
@nrollr
nrollr / nginx.conf
Last active May 11, 2024 16:31
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration

Thoughts on a Meteor ORM

While we're approaching the 1.0 release of Meteor, the need and interest in additional databases support (other than MongoDB) has risen consequently. Thus, SQL support is the second most requested feature on the official meteor roadmap (after server-side rendering) and there have been various demands on the forums about supporting Redis (also on the roadmap), RethinkDB, LevelDB, Neo4J, ElasticSearch, Mysql/MariaDB, PosgreSQL, SQLite and some other. More importantly the Meteor community has started to work on atmosphere packages that bring support for these databases and it appeared to be a very difficult task – most projects were abandoned.

The problem

What makes the integration of a new database a lot harder in Meteor than in most other web frameworks (including “full stack” JavaScript frameworks like Derby or Sails) lies in the third [principle of Meteor](http://docs.meteor.com/

# A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis)
# Check our Studio: https://gentlenode.com/
meteor add iron:router
meteor update iron:router
# Iron Router > Configuration
@leevigraham
leevigraham / ssl-setup.sh
Last active April 8, 2018 02:50
Create Self Signed Certificate for Apache on OSX Mountain Lion: http://www.akadia.com/services/ssh_test_certificate.html
mkdir ~/Desktop/ssl
cd ~/Desktop/ssl
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
sudo cp server.crt /private/etc/apache2/server.crt
sudo cp server.key /private/etc/apache2/server.key