Skip to content

Instantly share code, notes, and snippets.

View mrtnzlml's full-sized avatar
🐢
I may be slow to respond.

Martin Zlámal mrtnzlml

🐢
I may be slow to respond.
View GitHub Profile
@mrtnzlml
mrtnzlml / keybase.md
Last active September 12, 2017 18:41

Keybase proof

I hereby claim:

  • I am mrtnzlml on github.
  • I am mrtnzlml (https://keybase.io/mrtnzlml) on keybase.
  • I have a public key ASADGpO1TWE5EpWhUVa2Mpr6qLDYCh9PULMZRU-z9ICW7wo

To claim this, I am signing this object:

@mrtnzlml
mrtnzlml / graphql-1.txt
Last active May 1, 2019 15:54
GraphQL Summit 2017 in San Francisco
GraphQL at massive scale
- IBM cloud = node micro services (30+ teams) - separate codebases
- frontend need to fetch data from multiple endpoints (bad documentation) - it’s a inconsistent mess
- graphql centralize this - grapnel microservice (single endpoint), documentation included
- data sources (schema + resolvers + model + connector) = plugin (independent GitHub repo)
- GrAMPS Middleware (schema stitching)
- extended error messages (GUID, documentation links
- datasource starter kit (strong starting point for new data sources)
- GitHub: grapms-graphql/gramps-express (based on Apollo server) - MIT licence - GraphQL Apollo Microservice Patterns Server
// @flow strict
import isObject from './isObject';
// Inspiration (modified and fixed stability):
// https://github.com/facebook/relay/blob/87930e12ed9694865d3a70dda564c0711e2890fd/packages/relay-runtime/util/stableCopy.js
/**
* @see http://www.ecma-international.org/ecma-262/6.0/#sec-sortcompare
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
@mrtnzlml
mrtnzlml / notes.md
Created August 16, 2019 20:12
Facebook monorepo reverse engineering
fbandroid/first-party/java/androidsdk/
fbandroid/libraries/soloader/
fbandroid/libraries/textlayoutbuilder/
fbandroid/xplat/yoga/BUCK							# xplat ??

fbobjc/EndToEndTests/WebDriverAgent/src/
fbobjc/VendorLib/IGListKit/src/					# Instagram
fbobjc/VendorLib/ComponentKit/src/
fbobjc/ios-sdk/AccountKit/samples/
@mrtnzlml
mrtnzlml / slack.js
Created September 30, 2019 18:02
Downloading Slack emojis
import fs from 'fs';
import path from 'path';
import fetch from '@kiwicom/fetch';
// See: https://gist.github.com/lmarkus/8722f56baf8c47045621
import { emoji } from './emoji.json';
(async function() {
for (const [name, link] of Object.entries(emoji)) {
const downloadLink = link;
@mrtnzlml
mrtnzlml / cmdParser.js
Created October 24, 2019 00:59
WIP (well, abandoned)
// @flow strict
function terminate(help, error) {
console.error('%s\n\n%s', help, error);
process.exit(1);
}
/**
* Goal of this parser is to create less awkward tool for working with command line. You just
* have to write a help screen and the rest is responsibility of this parser.
Once upon a time,
you join a company and you have to rhyme.
This story begins at the end of last year,
when I was in Mexico and changing career.
Pipedrive seemed to be quite a good choice,
but I also had to hear my internal voice.
Should I go or should I stay,
@mrtnzlml
mrtnzlml / store-with-id.json
Created February 6, 2020 14:49
Internal structure of Relay store. Notice the difference for "AllHotelAvailabilityHotel" type. First JSON is an example of AllHotelAvailabilityHotel WITH GraphQL ID and second JSON shows how is it being stored when such ID doesn't exist.
{
"client:root": {
"__id": "client:root",
"__typename": "__Root",
"allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})": {
"__ref": "client:root:allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})"
}
},
"client:root:allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})": {
"__id": "client:root:allAvailableBookingComHotels(search:{\"checkin\":\"2020-02-13\",\"checkout\":\"2020-02-15\",\"cityId\":\"SG90ZWxDaXR5Oi0zNzI0OTA=\",\"roomsConfiguration\":[{\"adultsCount\":2}]})",
@mrtnzlml
mrtnzlml / sx.generated.css
Created July 9, 2021 00:00
CSS generated by SX (https://github.com/adeira/sx) on a more complex page (Abacus BO - products grid)
.hECNM {
--sx-error-lighter: 247, 212, 214;
}
._4wLsl0 {
--sx-error-light: 255, 26, 26;
}
._4Coem6 {
--sx-error: 238, 0, 0;
}
.zPcsP {