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
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 / gist:3529050
Created August 30, 2012 13:56
Generate MetaProj file from solution
$env:MSBuildEmitSolution=1
msbuild FooBar.sln /t:ValidateSolutionConfiguration
$env:MSBuildEmitSolution=0
@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"
});
@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;
version: '3.3'
services:
agent:
image: swarmpit/agent:2.0
environment:
DOCKER_API_VERSION: '1.35'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- net
@rarous
rarous / Readme.md
Last active December 11, 2018 16:06
Serverless workshop
  • What is Serverless?
    • Business decision CAPEX → OPEX
    • What is not?
    • FaaS on your own k8s cluster
    • Gotchas
    • Latencies
    • Cold start penalty
    • Monitoring
  • Offerings
@rarous
rarous / json.js
Created November 1, 2018 06:21
Quick experiment of JSON integers serialisation
JSON.parse(JSON.stringify({"arbitrary": Math.pow(2, 128), "arbitrary+1": Math.pow(2, 128) + 1, "arbitrary-1": Math.pow(2, 128) - 1, "64bit": Math.pow(2, 64), "64bit+1": Math.pow(2, 64) + 1, "64bit-1": Math.pow(2, 64) - 1, "53bit": Math.pow(2, 53), "53bit+1": Math.pow(2, 53) + 1, "53bit-1": Math.pow(2, 53) - 1,"32bit": Math.pow(2, 32), "32bit+1": Math.pow(2, 32) + 1, "32bit-1": Math.pow(2, 32) - 1,}))
@rarous
rarous / ring.logger.cambium.clj
Last active December 10, 2017 06:23
Structured logging adapter for ring-logger middleware
(ns ring.logger.cambium
(:require
[cambium.core :as log]
[ring.logger.messages :as messages]
[ring.logger.protocols :refer [Logger]]
[ring.logger :as logger]))
(defrecord CambiumLogger []
Logger
(def employee-stats
(xf/transjuxt
{:billable-hours (comp billable-hours (xf/reduce +))
:startups-hours (comp startups-hours (xf/reduce +))
:non-billable-without-edu-hours (comp non-billable-without-edu-hours (xf/reduce +))
:without-allocation-hours (comp without-allocation-hours (xf/reduce +))
:education-hours (comp education-hours (xf/reduce +))
:time-off-hours (comp time-off-hours (xf/reduce +))
:projects-count (comp significant-projects xf/count)}))