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 / su-exec.c
Created December 2, 2023 22:22
su-exec.c
/* set user and group id and exec */
#include <sys/types.h>
#include <err.h>
#include <errno.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
@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)"'
.
├── app
│   ├── controller
│   ├── model
│   └── view
├── composer.json
├── .develtio-runner
│   ├── config.env
│   ├── DEVELTIO_RUNNER.md
#!/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
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
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 && \