All gists

0 0 1

System Design Interview: Designing a Ticket Booking System (Ticketmaster-style)

The hard part isn't browsing events; it's selling a limited number of seats to a crowd that all clicks "buy" in the same second.

Requirements

  • Browse events and see a seat map with availability.
  • Hold seats for a few minutes during checkout; never sell the same seat twice.
  • Survive "on-sale" spikes: 1M users arriving for 50k seats.
MrGeneration
Last active 3 weeks ago elasticsearch zammad upgrade helper scripts

This gist holds all required commands to upgrade Elasticsearch from 7 to 9 without data loss. It also holds helper scripts for this process. The order is crucial and not reflected independently in this gist. As shown on https://www.youtube.com/watch?v=sb3VBkaHGz4

0 0 6
1 # What we ultimatively add to the Elasticsearch configuration during the upgrades
2 # xpack
3 xpack.security.enabled: true
4 xpack.security.transport.ssl.enabled: true
5 xpack.security.transport.ssl.verification_mode: certificate
6 xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12
7 xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12
8 xpack.security.http.ssl.enabled: true
9 xpack.security.http.ssl.keystore.path: certs/http.p12
MrGeneration
Last active 1 month ago zammad knowledge base custom css stylesheed

Sample dark mode variant for your public Zammad Knowledge Base. As shown in the Zammad 7.2 release video: https://www.youtube.com/watch?v=2X5dMVEfgHo

0 0 1
1 /*
2 * Dark theme for the Zammad public Knowledge Base.
3 *
4 * Install per https://next.zammad.org/en/tutorials/custom-kb-css.html:
5 * 1. Copy this file into app/assets/stylesheets/custom_knowledge_base_public/
6 * 2. rake assets:precompile
7 * 3. Restart Zammad
8 * 4. View the *published* KB (not the admin editor) to see the result.
9 *
10 * Built against the markup/CSS served at /help/ (Zammad's default
MrGeneration
Last active 3 months ago csv import users organizations

Sample CSV files to highlight the CSV import function - as shown in the youtube video https://www.youtube.com/watch?v=OeelYx106WU

0 0 2
1 login,firstname,lastname,email,web,phone,fax,mobile,department,street,zip,city,country,address,vip,verified,active,note,last_login,out_of_office,out_of_office_start_at,out_of_office_end_at,roles,two_factor_preferences,out_of_office_replacement,organizations,chat_agent_created_by,chat_agent_updated_by,overview_sortings,organization
2 mherrguth@example.com,Marcel,Herrguth,mherrguth@example.com,"","","","",,"","","","",,false,false,true,"",,false,,,Customer,"",,"",,,"",
3 some-employee@example.com,Marcel,Herrguth,some-employee@example.com,"",+492214710231,"","","","","","","","",false,false,true,"",2024-11-26T17:01:15Z,false,,,Admin~~~Agent~~~Customer,"",,"",,,"",Zammad GmbH
4 nicole.braun@zammad.org,Nicole,Braun,nicole.braun@zammad.org,"","","","","","","","","","",false,false,true,"",,false,,,Customer,"",,"",,,"",Zammad Foundation
MrGeneration
Last active 4 months ago

With Zammad 6.2 existing configurations for Email channels and i-doit by default have ssl verification disabled. This code snippet activates SSL verification. This change ONLY affects existing, update installations.

0 0 8
1 # Side note: Elasticsearch has an option to verify SSL as well. This might be an edge case.
2 # By default these certificates are self-signed and thus you may not want to run this at all
3 Setting.set('es_ssl_verify', true)
MrGeneration
0 0 1
1 # This quickly changes from the old packager.io to the new packager.io repository
2 # Commands require sudo / root permissions
3
4 # Drop existing GPG-Key and Repository-File
5 rm -f /etc/apt/trusted.gpg.d/pkgr-zammad.gpg /etc/apt/sources.list.d/zammad.list
6
7 # Download the new Keyring
8 curl -fsSL "https://go.packager.io/srv/deb/zammad/zammad/gpg-key.gpg" \
9 -o /usr/share/keyrings/zammad.gpg
MrGeneration
Last active 6 months ago restic backup restore zammad

As shown on https://youtu.be/P-Pr7Dy6mP8

0 0 2
1 #!/usr/bin/env bash
2 #
3 # 2025-09-06 Marcel Herrguth
4 # As shown on https://youtu.be/P-Pr7Dy6mP8
5 # Attribution back to this GIST is required!
6 #
7 # Parts of this script are oriented from https://github.com/zammad/zammad/tree/develop/contrib/backup
8 # Only PostGreSQL is supported; No symlinks are supported
9 #
10 # Restoration only works on a pre-installed Zammad installation of the same version (or higher).
MrGeneration
Last active 6 months ago zammad knowledge base catalan es-ca

Redirects outdated locale slug for knowledge bases from 'es-ca' to 'ca' for improved usability and very easy switching. As shown in the Zammad 7.0 Release video: https://www.youtube.com/watch?v=unwYUx5--7M

0 0 2
1 # Default /help URL (replace help with your custom alias if needed; NOT for custom domains)
2 rewrite ^/help/es-ca/(.*)$ /help/ca/$1 permanent;
3
4 # for custom URLs
5 rewrite ^/es-ca/(.*)$ /ca/$1 permanent;