Skip to content

Instantly share code, notes, and snippets.

@styblope
styblope / docker-api-port.md
Last active November 7, 2024 23:14
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"]}
    
@styblope
styblope / external-ip-services.sh
Created September 26, 2018 20:33
Services routing using external IPs
# https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
# If there are external IPs that route to one or more cluster nodes, Kubernetes services can be exposed on those externalIPs.
# Traffic that ingresses into the cluster with the external IP (as destination IP), on the service port, will be routed to
# one of the service endpoints.
# Create test app pods
cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
#### Contents of the preconfiguration file (for stretch)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US.UTF-8
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string US
#d-i debian-installer/locale string en_US.UTF-8
@styblope
styblope / Customization.pm
Created October 4, 2018 08:10
VMWare vCenter network adapter name detection fix
sub GetInterfaceByMacAddress
{
# This function is same as GetInterfaceByMacAddress but uses
# '/sbin/ip addr show' instead of/sbin/ifconfig
my ($self, $macAddress, $ipAddrResult) = @_;
my $result = undef;
if (! defined $ipAddrResult) {
my $ipPath = Utils::GetIpPath();
if ( defined $ipPath){

Install IBM ACE from PPA Archive

bx pr load-ppa-archive --archive /home/user/DOWNLOADS/ACE_V11.0_Container.tar.gz --clustername mycluster.icp

Verify ACE production chart in the ICP catalog

ICP -> Catalog

Install and run

HOWTO INSTALL DOCKER 18.03 EE on RHEL 7.5

Note:

The docker package comes from the RHEL Extras repository (rhel-7-server-extras-rpms). RHEL Extras is only supported with the latest RHEL minor release. So now Extras requires RHEL 7.5.

Previous minor releases will fail on dependency errors. Need to download custom version of container-selinux, see below.

RedHat and Docker account registration

@styblope
styblope / dnsmasq.md
Created November 30, 2018 17:38 — forked from jlebon/dnsmasq.md
How to set up dnsmasq on an OpenShift cluster

This gist is mostly based on the dnsmasq appendix from the openshift-training repo. However, I updated it and included fixes for the many gotchas I found along the way.

This is useful for folks who want to set up a DNS service as part of the cluster itself, either because they cannot easily change their DNS setup outside of the cluster, or just because they want to keep the cluster setup self-contained.

@styblope
styblope / gist:fced9f3ee475eafc887a6745083d2073
Last active June 25, 2024 22:19
src/lua/Task.cpp: Load new task in XCSoar's natiove .tsk data format
// Load task in XCSoar's .tsk format
static int
l_load_task(lua_State *L)
{
if (lua_gettop(L) != 1)
return luaL_error(L, "Invalid parameters");
size_t l;
const auto doc = luaL_checklstring(L, 1, &l);
if (l == 0) return 0;
@styblope
styblope / task-from-soarscore.lua
Last active June 25, 2024 22:24
Read a day task from soarscore.com
---@diagnostic disable: lowercase-global
COMPETITION = "az-cup-2024-zbraslavice-2024"
CLASS = "club"
function parse_tasks(doc)
for c in string.gmatch(doc, "href=\"(%S+"..CLASS.."%S+%.tsk)\"") do
return c
end
return nil
end