Skip to content

Instantly share code, notes, and snippets.

View josemarluedke's full-sized avatar

Josemar Luedke josemarluedke

View GitHub Profile
@josemarluedke
josemarluedke / release-drafter.yml
Last active November 10, 2019 02:18
My Release Drafter configuration
# Configuration for Release Drafter - https://github.com/toolmantim/release-drafter
name-template: v$NEXT_MINOR_VERSION
tag-template: v$NEXT_MINOR_VERSION
categories:
- title: ':boom: Breaking Change'
label: 'Type: Breaking Change'
- title: ':rocket: Enhancement'
label: 'Type: Enhancement'
function hexToHSL(H) {
// Convert hex to RGB first
let r = 0, g = 0, b = 0;
if (H.length == 4) {
r = "0x" + H[1] + H[1];
g = "0x" + H[2] + H[2];
b = "0x" + H[3] + H[3];
} else if (H.length == 7) {
r = "0x" + H[1] + H[2];
g = "0x" + H[3] + H[4];
@josemarluedke
josemarluedke / index.d.ts
Created May 4, 2019 04:41
Ember FastBoot service typescript type definitions
declare module 'ember-cli-fastboot/services/fastboot' {
import Service from '@ember/service';
interface Request {
method: string;
body: unknown;
cookies: unknown;
headers: unknown;
queryParams: unknown;
path: string;
@josemarluedke
josemarluedke / ember-oo-modifiers-index.d.ts
Created April 17, 2019 04:24
Typescript type definitions for ember-oo-modifiers
declare module 'ember-oo-modifiers' {
export default class Modifier<T = object, T2 = unknown[]> {
public element: HTMLElement;
public constructor(attrs: T, _owner: unknown);
public static modifier(Klass: unknown): unknown;
public didInsertElement(positional: T2, args: T): void;
public didRecieveArguments(positional: T2, args: T): void;
public didUpdateArguments(positional: T2, args: T): void;
{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"explorer.confirmDragAndDrop": false,
"[handlebars]": {
"editor.formatOnSave": false
},
"[graphql]": {
"editor.formatOnSave": false
},
@josemarluedke
josemarluedke / from-introspection-schema-result-to-graphql-sdl.js
Created April 3, 2019 14:31
Generate a SDL graphql string from a introspection schema result
const { buildClientSchema, printSchema } = require('graphql');
const fs = require('fs');
const introspectionSchemaResult = JSON.parse(
fs.readFileSync('./graphql.schema.json')
);
const graphqlSchemaObj = buildClientSchema(introspectionSchemaResult);
const sdlString = printSchema(graphqlSchemaObj);
node_modules/@glimmer/runtime/dist/types/lib/vm/append.d.ts:121:5 - error TS2416: Property 'scope' in type 'VM<C>' is not assignable to the same property in base type 'InternalVM<C>'.
Type '() => Scope<JitOrAotBlock>' is not assignable to type '() => Scope<C>'.
Type 'Scope<JitOrAotBlock>' is not assignable to type 'Scope<C>'.
Type 'JitOrAotBlock' is not assignable to type 'C'.
Type 'number' is not assignable to type 'C'.
121 scope(): Scope<JitOrAotBlock>;
~~~~~
[
{
"color": "d93f0b",
"description": "This has a high priority",
"name": "Priority: High"
},
{
"color": "0e8a16",
"description": "This has a low priority",
"name": "Priority: Low"
@josemarluedke
josemarluedke / projections.json
Created August 14, 2018 18:27
Projections Ember Pods & TS
{
"app/initializers/*.js": {
"type": "initializer",
"alternate": "tests/unit/initializers/{}-test.js"
},
"tests/unit/initializers/*-test.js": {
"type": "initializer-test",
"alternate": "app/initializers/{}.js"
},
"app/instance-initializers/*.js": {
@josemarluedke
josemarluedke / Dockerfile
Created May 13, 2018 06:39
Ember with Docker
FROM node:10
RUN apt-get update && apt-get install -y jq
# Install Watchman
RUN \
git clone https://github.com/facebook/watchman.git &&\
cd watchman &&\
git checkout v4.9.0 &&\
./autogen.sh &&\