Skip to content

Instantly share code, notes, and snippets.

View mlebkowski's full-sized avatar
🤷‍♀️

Maciej Łebkowski mlebkowski

🤷‍♀️
View GitHub Profile
@mlebkowski
mlebkowski / acme-route53.awscfg
Created April 10, 2024 07:40
Local HTTPS and load balancing for docker compose projects
[default]
aws_access_key_id =
aws_secret_access_key =
From: Puck <puck@go2.pl>
Newsgroups: alt.pl.fan.gopher
Subject: Re: Czy aby Hakiery :)) (fwd)
Date: Thu, 01 Aug 2002 09:13:42 +0200
Message-ID: <20020801.12129@news.blade.net>
Oto rezultat stukania w klawisze przez osobę, pragnącą być
identyfikowana jako "Adam `Gophi' Wysocki" <adam@wysocki.lodz.pdi.net>:
> > > Adam informuje Cie grzecznie, ze masz kurs do Gdanska.
describe('ConnectionIdentifierLabelFactory', () => {
// test cases declarations using gherkin syntax:
test('call pstn number', () => {
when_i_call('+48500100100');
then_i_expect_label_to_be('+48 500 100 100');
});
test('call task by id with prefix', () => {
const id = uuid();
@mlebkowski
mlebkowski / creating-sut.php
Last active December 17, 2021 08:57
Unit tests code style
<?php
// region $sut = new WaitingScriptFactory()
$sut = new WaitingScriptFactory(
new CallerContextFactory(
new StaticWaitingMusicRepository(self::MUSIC_URL),
new StaticLinePositionAnnouncementConfiguration(),
new StaticAnnouncementFactory($this->announcement),
),
new StaticResponseBuilderFactory($this->responseBuilder),
public function findUpcomingForPatient(Patient $patient): ?Visit
{
- return $this->cache->fetch($patient->getId())
- ?: $this->visits->findUpcomingForPatient($patient);
+ $key = $patient->getId();
+ if ($this->cache->contains($key)) {
+ return $this->cache->fetch($key);
+ }
+
+ return $this->visits->findUpcomingForPatient($patient);
@mlebkowski
mlebkowski / Makefile
Last active February 6, 2020 19:45
Polish IT Conferences
EXECUTABLES = php aws curl awk
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),,$(error "No $(exec) in PATH")))
all: vendor app.php
php app.php > conferences.ical
aws s3 cp --acl public-read --content-type "text/calendar" conferences.ical s3://polish-it-conferences/conferences.ical --profile polish-it-conferences
vendor: composer composer.json composer.lock
./composer install
version: "3"
services:
www:
build: .docker/php
command: gulp browser-sync --proxy http://backend
working_dir: /app
ports:
- 3000:3000

50001

1 DireTide 2 First Floor 3 Kill All Humans! 4 GUARDIAN ANGELS 5 The Lost Cartel 6 Acts of Vengeance 7 Black Lotus 8 Best Of The Best Of The Best

#!/bin/bash
SOURCE=${SOURCE:-cartoon-dev}
TARGET=${TARGET:-cb-live}
FILES=(cards.xml cards_finalform.xml cards_mythic.xml levels.xml combos.xml missions.xml)
ENDPOINT="http://%s.synapse-games.com/assets/%s"
get_diff() {
declare file=$1
#!/bin/bash
export_diff() {
declare project=$1 period=$2 hash=$3
local person="$(git -C "$project" show --format="%an" -s "$hash")"
local target="output/$period/$person/${project#projects/}/$hash.html"
mkdir -p "$(dirname "$target")"