Skip to content

Instantly share code, notes, and snippets.

View rarous's full-sized avatar
💭
I may be slow to respond.

Aleš Roubíček rarous

💭
I may be slow to respond.
View GitHub Profile
(def data
[{:title "Getting started"
:reset_lesson_position false
:lessons [{:name "Welcome"}
{:name "Installation"}]}
{:title "Basic operator"
:reset_lesson_position false
:lessons [{:name "Addition / Subtraction"}
{:name "Multiplication / Division"}]}
{:title "Advanced topics"

Keybase proof

I hereby claim:

  • I am rarous on github.
  • I am rarous (https://keybase.io/rarous) on keybase.
  • I have a public key ASBuiDfE06iXsjjSc07H7z5dnMK3hezIB8ZF8bmil8b7AQo

To claim this, I am signing this object:

const apiCertificate = getCertificate(this.domainName);
this.apiDistribution = new aws.apigateway.DomainName(name, {
domainName: this.domainName,
endpointConfiguration: { types: "EDGE" },
securityPolicy: "TLS_1_2",
certificateArn: apiCertificate.apply(x => x.arn)
});
const hostedZone = getHostedZone(this.domainName);
this.dnsRecord = new aws.route53.Record(name, {
name: this.domainName,
@rarous
rarous / typovy-sebeklam.ts
Created May 3, 2020 16:04
Ukázka typové masturbace, kvůli špatně otypované knihovně
// drive().files.export je otypovaná jako Promise<void>,
// ale skutečný typ je dán parametrem v { responseType: "stream" }
// Aby se uspokojil kompilátor, musíme nejprve typ zázračně zapomenout
// a pak si ho přetypovat dle libosti. Masturbace.
async function convertToPdf(fileId: string): Promise<fs.ReadStream> {
const response: unknown = await drive().files.export(
{ fileId, mimeType: "application/pdf" },
{ responseType: "stream" }
);
@rarous
rarous / trace.json
Created April 28, 2020 13:51
Pay to go app
This file has been truncated, but you can view the full file.
{"traceEvents":[
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29580,"tid":775,"ts":0},
{"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29580,"tid":33027,"ts":0},
{"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29583,"tid":24835,"ts":0},
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29585,"tid":775,"ts":0},
{"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29585,"tid":19715,"ts":0},
{"args":{"name":"Chrome_DevToolsHandlerThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29580,"tid":46083,"ts":0},
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29580,"tid":29187,"ts":0},
{"args":{"name":"Chrome_ChildIOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":29585,"tid":18179,"ts":0},
{"args":{"name":"Chrome_Chi
fetch("https://lighthouse-dot-webdotdevsite.appspot.com/lh/newaudit",
{"credentials":"omit",
"headers":
{"accept":"*/*",
"accept-language":"en-US,en;q=0.9,cs-CZ;q=0.8,cs;q=0.7",
"cache-control":"no-cache",
"content-type":"application/json",
"pragma":"no-cache"},
"referrer":"https://lighthouse-dot-webdotdevsite.appspot.com/",
"referrerPolicy":"no-referrer-when-downgrade",
@rarous
rarous / an-usage.ts
Last active August 21, 2019 04:38
Pulumi definition of Datomic Ions Resources and API Gateway integration
import * as ions from "./ions";
const cloud = new ions.DatomicCloud("test-ions", {
enableBastion: true,
applicationName: "test",
systemName: "datomic-test",
environmentMap: "{:env :test}",
keyName: "test-key"
});
/**
* @copyright 2015-2016 TopMonks s.r.o.
* @flow weak
*/
import React, {Children, cloneElement} from 'react';
import component from '../component';
import {Map} from 'immutable';
type Crop = 'scale' | 'fill' | 'lfill' | 'fit' | 'mfit' | 'limit' | 'pad' | 'lpad' | 'mpad' | 'crop' | 'thumb';
@rarous
rarous / github-readme.css
Created July 15, 2019 07:57
Stylesheet for Makdown ala Github
body {
background: #fff;
padding: 0 16px 32px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
line-height: 1.5;
color: #333;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 16px;
line-height: 1.5;