Skip to content

Instantly share code, notes, and snippets.

View barser's full-sized avatar
☺️

Sergey Baranov barser

☺️
View GitHub Profile
@andrewnk
andrewnk / gist:ecba8448b5009eaa3ae1433c549d881d
Created July 20, 2021 01:01
Resize partition in alpine
# after the virtual disk has already been expanded (e.g. in proxmox)
apk add --no-cache cfdisk e2fsprogs-extra
# choose partition then "Resize" > "Write" (to finalize)
cfdisk
# replace * with partition you are resizing
resize2fs /dev/*
@62mkv
62mkv / README.md
Created October 11, 2019 08:46
How to add a custom trusted certificate for making HTTP requests against external sites

Thoughts on how to add trusted store for connection to external sites that use that certificate for HTTPS

Option 1: global configuration

One can just provide the -Djavax.net.ssl.trustStore=<path/to/store> -Djavax.net.ssl.trustStorePassword=<password> options when running the Java application

However, this is not always possible (for example, when run in the cloud).

And if you want to use server.ssl.trust-store/server.ssl.trust-store-password options from Spring Boot, be aware that with those you also have to provide key-store options as well. And, basically that would be an abuse, because this configuration is specifically for server side of your application.

@hamburghammer
hamburghammer / add_CA_on_linux.md
Last active May 21, 2024 11:48 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS, Manjaro, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://example.com

On Manjaro (arch) the location for the certificates is: /usr/share/ca-certificates/trust-source/anchors (low priority) or /etc/ca-certificates/trust-source/anchors/ (high priority) and the command to update is update-ca-trust extract.

@caglar10ur
caglar10ur / microk8s
Last active January 9, 2024 19:29
microk8s setup with istio
snap install microk8s --classic
sudo ufw default allow routed
sudo iptables -P FORWARD ACCEPT
microk8s.enable dns dashboard metrics-server
# grafana/dashboard
# http://IP:8080/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy/
# http://IP:8080/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/pod?namespace=default
microk8s.enable istio
@davideicardi
davideicardi / cloudera-docker.md
Last active April 4, 2024 19:00
Running Cloudera with Docker for development/test
@styblope
styblope / docker-api-port.md
Last active July 25, 2024 11:43
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@BretFisher
BretFisher / docker-swarm-ports.md
Last active June 11, 2024 14:06
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

@savelee
savelee / MyD3Chart.js
Last active September 21, 2017 07:00
Ext JS 6.2 - Extend from D3 base class example
Ext.define("Engine.view.charts.MyD3Chart",{
extend: "Ext.panel.Panel",
xtype: 'myd3chart',
requires: [
'Ext.d3.svg.Svg'
],
layout: 'fit',
scrollable: true,
items: [{
xtype: 'd3',
@PieterScheffers
PieterScheffers / start_docker_registry.bash
Last active October 29, 2023 18:26
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@finalfantasia
finalfantasia / fixing_text_anti_aliasing_in_fedora.md
Last active March 20, 2024 22:53
Fixing Text Anti-aliasing in Fedora
  1. Add the RPMFusion repositories (both free and non-free) to the YUM repository directory (/etc/yum.repos.d/):
sudo dnf localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  1. Install the patched version of FreeType with subpixel rendering enabled:
sudo dnf install -y freetype-freeworld