Skip to content

Instantly share code, notes, and snippets.

View michaljemala's full-sized avatar
🕵️‍♂️
Looking for a passionate engineering team lead

Michal Jemala michaljemala

🕵️‍♂️
Looking for a passionate engineering team lead
  • Bratislava, Slovakia
View GitHub Profile
{
"nodes" :[
{"id": 1, "value": 40, "title": "Martin Linkov", "image": "img/martin.jpg"},
{"id": 2, "value": 40, "title": "Mike Butcher", "image": "img/mike.jpg"},
{"id": 3, "value": 40, "title": "Unigraph", "image": "img/ug.png"},
{"id": 4, "value": 40, "title": "Techcrunch", "image": "img/tc.jpg"},
{"id": 5, "value": 40, "title": "Techcrunch Disrupt London", "image": "img/ds.png"},
{"id": 6, "value": 40, "title": "Ingen.io", "image": "img/ingenio.png"},
{"id": 7, "value": 40, "title": "London", "image": "img/london.jpg"},
{"id": 8, "value": 40, "title": "Atanas Youroukov", "image": "img/atanas.jpg"},
# Population with filter for particular period:
query UK {
node(id: "0491") {
label(lang: "en")
population(filter: "$point_in_time == `2010`") @propagate
}
}
# List of genders using the gender ID
query GenderNode {
@michaljemala
michaljemala / MySQL_macOS_Sierra.md
Created November 15, 2016 14:02 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

package main
import (
"flag"
"fmt"
"log"
"net/http"
)
var (
@michaljemala
michaljemala / check_gen.go
Created January 2, 2018 21:00
Generate a SQL check constraint benchmark
package main
import (
"log"
"math/rand"
"os"
"text/template"
"time"
)
@michaljemala
michaljemala / aws.go
Created March 15, 2018 11:40
AWS - Subscribe queue to a topic
package main
import (
"flag"
"fmt"
"log"
"os"
"time"
"github.com/aws/aws-sdk-go/aws"
@michaljemala
michaljemala / environment
Created March 23, 2018 11:25
systemd multi-line issue
TEST_KEY='{"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-nu6oq%40ringring-dev-98877.iam.gserviceaccount.com", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC5ymYTJeVxAi5s\niu0TXEd/5+pnneNLH8Wlu7DUq9SYVTifvoUpxYU6VfLMmVPPoqxSZeTeXmqewmKZ\n2LlVEs06zgxvSwAUdn2hAfaB8E/+p2qUHFdgIGK0c5tt7WMdHf2s3g87kCZ+RmHi\nDYesYwUR/v19vRSeCNyjKC0o3QXUmeoePUkupnO3o7FAXBSVpuAINzd4cKYmcpny\nCBbjsd/x5RmiKiDCwJcaaErYA4KgXLh7bw5y8DlOTnC5Zu531Fc5EAfkJ6vk/az2\nSnjxtSsQjV3bO4k0UnkRiBOKzPgDdK+SeFrw1Ac+7seqvQTSASVMM4jqa6PAwPJI\nhGNLptRNAgMBAAECggEAEuVge1sT2moP4a9BjIIKrZofT5mR1/6rwf70bbTqQvIL\n98dPUN/LfJLoRmHj0c7oOtstK2ar7miz0ZTmyJ3IbM4vGpSktfAVN+50rWONJ0fM\nwbKeOmMg1tyZNtV5iqkVt2LAZtzy5U3wP6cDoQdTKTDnhEXaVnZtRlTcPvc31BcF\nB4x8FQOtVi3D1gVKnn8L/mwmmM+hTDJffW/S+ia+l7Wy6Pv8+7F3R0pQ/wzkZhBo\nAcyOQI+7bxLRePXW3uBj/HGrgQMxF2jMnO/lu9doUest9x8jA1EEmHTSQa4xC+xO\nS2p18NRNupycB+MR1u4WEq2xGIxq8LyioZnitR0
@michaljemala
michaljemala / to_uuid.sql
Created April 12, 2018 12:21
OID to UUID
CREATE OR REPLACE FUNCTION uuid_from(oid bigint) RETURNS uuid AS $$
BEGIN
RETURN (
lpad(to_hex(oid::bit(64)::bit(32)::integer), 8, '0') ||
'-0000-4000-8000-0000' ||
lpad(to_hex((oid::bit(64)<<32)::bit(32)::integer), 8, '0')
)::uuid;
END;
$$ LANGUAGE plpgsql;
@michaljemala
michaljemala / expression.go
Created October 9, 2018 09:27
Mongo-like expressions
package graphql
import (
"fmt"
"strings"
"github.com/aintu/api-go-poc/orm"
)
const (
@michaljemala
michaljemala / graphql_desc.go
Created April 5, 2019 10:09
Descriptions not properly set
package main
import (
"log"
"net/http"
"github.com/graph-gophers/graphql-go"
"github.com/graph-gophers/graphql-go/relay"
)