Skip to content

Instantly share code, notes, and snippets.

@gbirke
gbirke / get_seq.php
Last active February 21, 2022 09:22
Test LAST_INSERT_ID
<?php
# SQL setup:
# CREATE TABLE payment_sequence (id INT NOT NULL);
# INSERT INTO payment_sequence VALUES(0);
# CREATE TABLE payment_log(id INT PRIMARY KEY, client_id INT, loop_id INT, ts DATETIME(6));
$db = new PDO("mysql:dbname=fundraising;host=database", 'fundraising', 'INSECURE PASSWORD');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
@gbirke
gbirke / Presentation.md
Last active February 21, 2022 16:12
Presentation on Clean Architecture in WMDE Fundraising
tags aliases created_on
2022-02-17

Clean Architecture and the Fundraising Application


What is the Clean Architecture

@gbirke
gbirke / Dockerfile
Last active February 25, 2022 08:46
Testing sequence support
FROM php:8.1-alpine
RUN set -ex \
&& apk --no-cache add postgresql-dev
RUN docker-php-ext-install pdo pdo_mysql pdo_pgsql
@gbirke
gbirke / gls_cc_extract_recipient.py
Created March 23, 2023 20:51
Convert CSV credit card statements of GLS Bank to look more like bank statements
#!/usr/bin/env python3
import argparse
import csv
import os.path
import sys
import logging
import re
"""
@gbirke
gbirke / index.html
Last active August 28, 2024 15:04
CSS Theming experiment
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link href="style.css" rel="stylesheet">
</head>
<body>