Skip to content

Instantly share code, notes, and snippets.

View kesor's full-sized avatar
🏠
Working from home

Evgeny Zislis kesor

🏠
Working from home
View GitHub Profile
@kesor
kesor / kops-cluster-update-errors.txt
Created September 1, 2020 12:09
kops cluster update duplicate IAM roles
I0901 15:06:00.194412 65709 factory.go:68] state store s3://mybucket.domain.com/mycluster
I0901 15:06:00.194584 65709 s3context.go:337] GOOS="darwin", assuming not running on EC2
I0901 15:06:00.194592 65709 s3context.go:170] defaulting region to "us-east-1"
I0901 15:06:00.987020 65709 s3context.go:210] found bucket in region "us-east-1"
I0901 15:06:00.987048 65709 s3fs.go:284] Reading file "s3://mybucket.domain.com/mycluster/mycluster.domain.com/config"
I0901 15:06:01.770731 65709 s3fs.go:321] Listing objects in S3 bucket "mybucket.domain.com" with prefix "mycluster/mycluster.domain.com/instancegroup/"
I0901 15:06:01.978948 65709 s3fs.go:349] Listed files in s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup: [s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup/master-us-east-1a s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup/nodes s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup/second]
I0901 15:06:01.978996 65709
@kesor
kesor / ffmpeg-grab-cam-display.sh
Created August 20, 2020 15:29
Record display, webcam and pulseaudio using ffmpeg
#!/bin/sh
# 1. create v4l2loopback device /dev/video42 using
# $ sudo modprobe v4l2loopback video_nr=42 max_buffers=2 exclusive_caps=1
ts=$(date +%Y-%m-%dT%H:%M:%SZ-%s)
PREFIX=/mnt/data/Videos
CAMERA_INPUT=/dev/video0
@kesor
kesor / component-app.js
Last active April 23, 2024 15:18
Vue.js 3.x with ES6 modules in the browser using import-map
import { defineAsyncComponent } from 'vue'
const Content = defineAsyncComponent(() => import('./component-content.js'))
export default {
name: 'App',
components: { Content },
template: /*html*/`
<Content />
`
@kesor
kesor / docker-compose.yaml
Last active July 13, 2020 10:51
Docker Compose for ElasticSearch + Kibana 7.8
# Create an EBS volume and attach to the EC2 instance
# Format as XFS and mount at /mnt/elastic-data
# /dev/nvme2n1 on /mnt/elastic-data type xfs (rw,relatime,attr2,inode64,noquota)
# For ElasticSearch to work - got to change this sysctl:
#
# sudo sysctl vm.max_map_count=262144
#
# $ cat docker-compose.yml
@kesor
kesor / docker-compose.yaml
Created July 13, 2020 10:49
Docker Compose for ElasticSearch + Kibana 7.8
# Create an EBS volume and attach to the EC2 instance
# Format as XFS and mount at /mnt/elastic-data
# /dev/nvme2n1 on /mnt/elastic-data type xfs (rw,relatime,attr2,inode64,noquota)
# $ cat docker-compose.yml
version: "3.7"
services:
elasticsearch:
@kesor
kesor / docker-compose.yaml
Created July 13, 2020 10:49
Docker Compose for ElasticSearch + Kibana 7.8
# Create an EBS volume and attach to the EC2 instance
# Format as XFS and mount at /mnt/elastic-data
# /dev/nvme2n1 on /mnt/elastic-data type xfs (rw,relatime,attr2,inode64,noquota)
# $ cat docker-compose.yml
version: "3.7"
services:
elasticsearch:
@kesor
kesor / utils.sh
Created July 1, 2020 07:57
example utils.sh
#!/bin/bash
# Common utility functions for bash scripts,
# - fatal -- use like `some_cmd || fatal "Some cmd failed"`
# - debug -- use like `debug "This is a debug message"`
# - timer -- use like `tm some_cmd` as a wrapper
# - retry -- use like `retry some_cmd` as a wrapper, retries with exp. backoff
#
# Source this bash like so: `. util.sh`
#
@kesor
kesor / Dockerfile
Last active June 18, 2020 11:23
example node.js production Dockerfile
FROM node:14.4
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -o APT::Install-Suggests=0 -o APT::Install-Recommends=0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /app \
&& chown node:node /app
ENV NODE_ENV production
@kesor
kesor / debug-grid.css
Created June 8, 2020 08:25
debug css grid
/* DEBUG Grid */
body {
position: relative;
background: blue;
}
body:after {
background-size: var(--grid-size) var(--grid-size);
background-repeat: repeat;
background-image:
linear-gradient(
controller:
kind: DaemonSet
ingressClass: XXX-ingress
daemonset:
useHostPort: true
hostPorts:
http: 68888
https: null
containerPort:
http: 68888