Skip to content

Instantly share code, notes, and snippets.

If I die before I wake, pray the lord my soul to take.

Michel Conrado MichelDiz

If I die before I wake, pray the lord my soul to take.
  • Dgraph
  • Salvador - Bahia - Brasil
Block or report user

Report or block MichelDiz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 1_1test.go
package main
import (
MichelDiz /
Created Sep 15, 2019 — forked from CollinChaffin/
Enable Docker Remote API on Photon OS v3(+)

Enable Local/Remote Docker API on PhotonOS


You must have already performed the following in one form or another as well as properly set a STATIC IP. Bear in mind many instructions do not properly show how to commit iptables changes on Photon which then survive reboots.

iptables -A INPUT -p tcp --dport 2375 -j ACCEPT
iptables -A INPUT -p tcp --dport 2376 -j ACCEPT
iptables-save > /etc/systemd/scripts/ip4save
MichelDiz / dgraph-1.1.0-rc3-test.go
Last active Aug 29, 2019 — forked from bgv/dgraph-1.1.0-rc3-test.go
View dgraph-1.1.0-rc3-test.go
package main
import (
View GetIssues_Customer_By_metaTags.YML
GetIssues_Customer_By_metaTags(func: eq(title, "Hyper Tech")) # @cascade @normalize
issues @filter(eq(metaTags, ["Urgent","Bug"]))# AND NOT eq(metaCategories, "Problem"))
participants {
View mutate.YML
set {
#We create the groups as nodes
_:group_year <name> "1979" .
_:group_year <release_date> "1979-01-01" .
_:group_year2 <name> "1950" .
_:group_year2 <release_date> "1950-01-01" .
View JSONMutate.JSON
"set": [ {
"user": [
"uid": "_:michael",
"name": "Michael",
"age": 39,
"Posts": [
"uid": "_:michaelfirst",
View registerDgraph.js
async registerDgraph({ username, email, password, role, isActive }) {
// const passwordHashed = await bcrypt.hash(password, 12);
console.log(username, '<====== username');
const txn = dgraph.newTxn();
try {
if (role === undefined) {
role = 'user';
const now = new Date().toISOString();
let mu = new dgraph.Mutation();
MichelDiz / sql.js
Last active Nov 20, 2017
This is an example code of how the apollo-universal-starter-kit would work using Dgraph. A powerful graph database, fast, has clustering ability, created in GoLang and so on. In this example I'm using a client that uses gRPC to communicate with Dgraph. See docs
View sql.js
// Helpers
//import { camelizeKeys, decamelizeKeys, decamelize } from 'humps';
import { has } from 'lodash';
import bcrypt from 'bcryptjs';
import DgraphClient from 'dgraph-node';
// Create a new client
let client = new DgraphClient({
url: 'localhost:9080',
debug: false

Keybase proof

I hereby claim:

  • I am micheldiz on github.
  • I am micheldiz ( on keybase.
  • I have a public key ASBjU3iHeA4_FpHGHorzXcFzmx9aExSv93oxLkvXVqg4MQo

To claim this, I am signing this object:

You can’t perform that action at this time.