Skip to content

Instantly share code, notes, and snippets.

View lukaszlach's full-sized avatar
🐳
Captain on the bridge!

Łukasz Lach lukaszlach

🐳
Captain on the bridge!
View GitHub Profile
@lukaszlach
lukaszlach / gist:180cc44cfd476d75387c3cd47a20918e
Created February 24, 2021 19:17
Communication between containers - disk, shared memory, unix sockets
— term (network)
1$ docker run -it alpine:3
2$ docker run -it centos
1$ ip a
2$ ip a
2$ ping 172.17.0.3
1$ apk -U add nginx
1$ nginx -g 'daemon off;'
1$ mkdir -p /run/nginx
1$ nginx -g 'daemon off;'
FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y curl apt-transport-https x11vnc xvfb gnupg && \
dpkg --add-architecture i386 && \
curl https://dl.winehq.org/wine-builds/Release.key | apt-key add - && \
echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" > /etc/apt/sources.list.d/wine.list && \
apt-get update && \
apt-get install -y --allow-unauthenticated --install-recommends winehq-devel && \
curl -o /usr/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
ARG UBUNTU_VERSION=20.04
FROM ubuntu:${UBUNTU_VERSION} AS ubuntu-desktop
ARG DESKTOP=xfce4
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y ${DESKTOP} firefox && \
rm -rf /var/lib/apt/lists/*
FROM ubuntu-desktop
#!/usr/bin/env bash
# curl -sSfL https://gist.githubusercontent.com/lukaszlach/87f4c1313071c86be2ecead05b78ba66/raw/gcp-uw-lite.sh | bash
# SSHd
sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication yes/g" /etc/ssh/sshd_config
sed -i "s/.*Port.*/Port 6667/g" /etc/ssh/sshd_config
echo 'Port 80' >> /etc/ssh/sshd_config
sed -i "s/.*ClientAliveInterval.*/ClientAliveInterval 45/g" /etc/ssh/sshd_config
sed -i "s/.*ClientAliveCountMax.*/ClientAliveCountMax 3/g" /etc/ssh/sshd_config
#echo 'ServerAliveInterval 15' >> /etc/ssh/sshd_config
.
├── app
│   ├── controller
│   ├── model
│   └── view
├── composer.json
├── .develtio-runner
│   ├── config.env
│   ├── DEVELTIO_RUNNER.md
@lukaszlach
lukaszlach / fifa.sh
Last active November 23, 2022 21:32
FIFA World Cup Qatar 2022™ live results
curl -sSfL 'https://api.fifa.com/api/v3/calendar/matches\?idCompetition=17&idSeason=255711' | \
jq -r '.Results | .[] | select(.MatchStatus == 3) | "\(.Home.ShortClubName) \(.Home.Score):\(.Away.Score) \(.Away.ShortClubName) \t@ \(.Stadium.Name[0].Description), \(.Stadium.CityName[0].Description) \t@ \(.StageName[0].Description)"'