Skip to content

Instantly share code, notes, and snippets.

:shipit:
Making databases easy...

Johannes Schickling schickling

Block or report user

Report or block schickling

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 resolver.ts
import type { Context } from '../../';
type EditReleaseInput = {
data: {
releaseId: string,
title?: string,
},
};
export default async (
View resolver.ts
import type { Context } from '../../';
type EditReleaseInput = {
data: {
releaseId: string,
title?: string,
},
};
export default async (
View NPM-best-practices.md

NPM Best Practices

  • Use yarn instead of npm (at least for now)
  • Check yarn.lock into version control
  • yarn.lock file is automatically ignored from publishing

graphql related

  • Make graphql a peer dependency (+ dev dependency if needed) in libraries
@schickling
schickling / bluebird-concurrency.js
Created Dec 23, 2016
Runs multiple GraphQL mutations concurrently with a maximum number of parallel promises
View bluebird-concurrency.js
import * as Bluebird from 'bluebird'
const myMutations = [
'mutation1: createItem(title: "Node 1") { id }',
'mutation2: createItem(title: "Node 2") { id }',
// ...
]
const transport = new Transport('my-graphcool-api')
const crm = new Lokka({transport})
@schickling
schickling / request.graphql
Last active May 26, 2016
Connections, Edges & Nodes in Relay (Relay Request + Response)
View request.graphql
{
movie(title: "Inception") {
releaseDate
actors(first: 10) {
edges {
node {
name
}
}
}
@schickling
schickling / request.graphql
Last active May 26, 2016
Connections, Edges & Nodes in Relay (Simple GraphQL Request + Response)
View request.graphql
{
movie(title: "Inception") {
releaseDate
actors {
name
}
}
}
@schickling
schickling / _README.md
Last active May 14, 2019
Script to import and export docker-machine configurations to sync between hosts/collaborators
View _README.md

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
@schickling
schickling / UIImageFixedOrientationExtension.swift
Last active Apr 30, 2019
Extension to fix orientation of an UIImage (Sets orientation to portrait)
View UIImageFixedOrientationExtension.swift
extension UIImage {
func fixedOrientation() -> UIImage {
if imageOrientation == UIImageOrientation.Up {
return self
}
var transform: CGAffineTransform = CGAffineTransformIdentity
@schickling
schickling / README.md
Last active Nov 12, 2015
Install OpenVPN on Ubuntu 14.04 for yourserver.se
View README.md

Preconditions

  • You need to have TUN/TAP enabled

Install dependencies

$ apt-get install -y openvpn easy-rsa
@schickling
schickling / ENV.md
Last active Aug 29, 2015
One command working enviornment setup
View ENV.md

This script automatically sets up my vim environment on any machine. For example in a docker container or an EC2 instance.

Dependencies

  • wget
  • vim
  • git

Usage

You can’t perform that action at this time.