Skip to content

Instantly share code, notes, and snippets.

Avatar

Beni Cherniavsky-Paskin cben

View GitHub Profile
@cben
cben / 00-MEMORY-USAGE-List.md
Last active Dec 7, 2020
High memory usage during ListAndWatch -> List
View named-locals-let-lambda-in-PostScript.md

Appendix to https://softwareengineering.stackexchange.com/a/418149/61264: Postfix stack languages

Point-free style is the default in "concatenative" programming languages like FORTH and PostScript. And, since they use postfix order, with function argument coming before the function, simulating "let" should be easy, right?

Funnily, there are no named-arg lambdas in most of these languages*. Not even the modern Factor (supports named arguments for named functions, but not in anonymous "quotations"). But FORTH and PostScript do have ways to simulate local variables. So we can show the equivalence the other way around: implement "let", then implement "lambda" in terms of "let" 😁.

View Dockerfile.selenium-tests
FROM fedora:31
MAINTAINER sd-mp-devel@redhat.com
# TODO: how to use prebuilt rubygem-nokogiri? Compiling it is heavy and brittle.
# That's what tools/hack_bundle.rb tries to achieve, but still compiles it.
# Fedora's rubygem-bundler is patched (as opposed to upstream `gem install bundler`)
# but no luck, both compile it. See also https://github.com/rubygems/bundler/issues/1964
RUN dnf install -y ruby ruby-devel rubygem-bundler rubygem-nokogiri gcc-c++ make redhat-rpm-config git dnf-plugins-core
RUN dnf builddep -y rubygem-nokogiri
@cben
cben / selenium_.json
Created Mar 17, 2020
https://github.com/cben/mathdown/issues/193 - examples of current saucelabs supported browsers json
View selenium_.json
{
"list": [
{
"name": "Desktop",
"list": [
{
"name": "PC",
"list": [
{
"name": "Operating System",
@cben
cben / README.md
Last active Aug 9, 2019
testing github shell highlighting md vs rst
View README.md
$ cd dir/ && ls -l "$files{@}"
drwxr-xr-x.  6 bpaskinc bpaskinc       4,096 Aug 30  2017  prometheus_api_client_ruby/
drwxr-xr-x.  2 bpaskinc bpaskinc       4,096 Feb  3  2016  Public/
$ rm -rf $(find -type f -name '*~')

Let's try fish:

@cben
cben / debt.md
Last active Apr 3, 2019
uhc config complexity debt example
View retro.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View deployment-string.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: null
generation: 1
labels:
run: sise
name: sise
View A. Regressions and changes in kubeclient 4.1.0.md

What happens at places marked COLLISION?

Currently kubeclient @entities hash is keyed by singular name, so if collision is on singular name, as for processedtemplates/templates:

# template.openshift.io/v1			openshift-origin-v3.6.0/apis/template.openshift.io/v1/index.json
	template	processedtemplates	
	template	templates	COLLISION

the last one wins — the earlier processedtemplates methods are not defined at all, only the latter template and templates methods!

@cben
cben / foo-4x6z5-uninstall-j6tvb
Created Dec 3, 2018
openshift/hive uninstaller logs without aws credentials
View foo-4x6z5-uninstall-j6tvb
time="2018-12-03T20:56:56Z" level=debug msg="Deleting PVs (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting EIPs (map[tectonicClusterID:ad3527db-3741-4833-b198-56c2db57cbe2])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting EIPs (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting NAT Gateways (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting instances (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting VPCs (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting IAM resources (map[tectonicClusterID:ad3527db-3741-4833-b198-56c2db57cbe2])"
time="2018-12-03T20:56:56Z" level=debug msg="deleting role: foo-4x6z5-master-role"
time="2018-12-03T20:56:56Z" level=debug msg="Deleting IAM resources (map[kubernetes.io/cluster/foo:owned])"
time="2018-12-03T20:56:56Z" level=debug msg="deleting role: foo-4x6z5-mas