Skip to content

Instantly share code, notes, and snippets.

View Kazanir's full-sized avatar

Christian Sieber Kazanir

  • Platform.sh
  • Las Vegas, NV
View GitHub Profile
[2133.93] Log: Unsuppressed event UICore
[2133.93] ScriptLog: UI state stack:
[2133.93] uicore: ============================================================
[2133.93] uicore: ---- BEGIN UIScreenStack.PrintScreenStack() -------------
[2133.93] uicore:
[2133.93] uicore: ---- Stack: General Information ----------------
[2133.93] uicore: Stack.GetCurrentScreen() = NPSBDP_UIArmory_PromotionHero_1
[2133.93] uicore: Stack.IsInputBlocked = False
[2133.93] uicore:
[2133.93] uicore: ---- Screens[]: Classes and Instance Names ---
@Kazanir
Kazanir / clb-notes.txt
Created September 3, 2017 19:32
Commerce License Billing 1.x Notes
Commerce License Billing - Current Layout
- CL Billing Cycle Engine
- Plugin Type
- Method: getBillingCycle($user, $start_date)
- Method: getNextBillingCycle($currentBillingCycle)
- Responsible for generating a series of billing cycles which determine what
time periods are used to e.g. pro-rate line items or generate new orders.
- This was fairly brittle in 1.x -- various untested assumptions essentially
depended on the periodic model.
@Kazanir
Kazanir / recurring.md
Last active June 17, 2020 08:27
Drupal Commerce Recurring 2.x Design Notes & Specification

Commerce Recurring 2.x

Intro

Recurring billing is an extremely complex feature with many use cases. In order to support all of these use cases in a robust way, a fully-featured Recurring module for Drupal Commerce 2.x needs to support them all, and be properly configurable/pluggable in a way that allows sufficient customization for developers while also being usable for store administrators.

This is a specification that attempts to transfer our accumulated knowledge from years of working on Commerce License Billing 1.x while also taking advantage of the designs Bojan and I worked on with Actualys and the Platform.sh team back in January.

The Overall Picture

@Kazanir
Kazanir / test.json
Last active December 5, 2016 20:10
{
"kits": [
{
"name": "perl",
"title": "Perl",
"description": "Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks",
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAgCAIAAABxdar3AAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAhwSURBVHjaYvz//z/DKMALLl68OGHChAsXLpw/fx4uCBBALAS1ff36/c7dp3fuPPny5TtExMBAVUJcSFxcaHiH18aNGw+AATDIMGUBAogRV4oDhteOnSd37jwJDDWICA8PJzzsgEBCQsjaWi8kyIHIEPz48SNWF2ACe3v7AQ+1hw8fOjg4fAADuCByWAEEEPaAW7ho+9p1B5CDCZTQ9FUvXLyNqdjD3Tw7K4ibmxO/UxobGxsaGoh0t4GBQQIY8PPzD2DwASMb6JIHDx5gBhxAAKEH3N27Tzu7lsBTGRwAkxsQvXjxDqsFQKnyshhrK12CKQ7oCEh5AReHBBCEDRQHysIdKiAgsGDBAn9//wEMO+T4Rg4rgABCCThgqBUWT0JLaMjJDZg9cYUdEADDzt3NjKBTFi5cCA8pYHwil7gQMHHixIKCAjgXGHbx8fGDLeAAAoiJmFBDlGviwnhkgUl1565TBJ2ioKAAZwPTFKaC/Px8YLqDc4GBCCxxBlvVARBA0IB7+fId/lD78uUbMD8SNA4Ydhcv3aHcWcCwA5bNEDaweEYOx0ECAAKICebhpfjTGhCoKMuASWn8ymrrZgNrZMpdhpxbN2zYMNgCDiCAQAF

Keybase proof

I hereby claim:

  • I am kazanir on github.
  • I am kazanir (https://keybase.io/kazanir) on keybase.
  • I have a public key ASBNS7HGgUBL4OCgFKCSf-EZdMcllR84UVWv8EgEvvO1-go

To claim this, I am signing this object:

@Kazanir
Kazanir / ArtifactPower.class.php
Created July 29, 2016 23:48
Artifact power MS/OS breakdown calculator
<?hh // strict
class ArtifactPower {
public Map<int, int> $costs = Map {
1 => 100,
2 => 400,
3 => 725,
4 => 1075,
5 => 1450,
<?php
// The goal is to turn any rendering calls part of a rendering tree into
// Hacklang async functions. Within compiled Twig templates this is tricky,
// because the `await foo()` syntax is not a true expression, and can only
// be used as part of assignment or return statements. That means that I
// need to turn this:
echo $this->env->getExtension('sandbox')->ensureToStringAllowed(
$this->env->getExtension('drupal_core')->escapeFilter($this->env, (isset($context["exposed"]) ? $context["exposed"] : null), "html", null, true)
@Kazanir
Kazanir / gist:3167ed186d8aa57ea600
Created October 12, 2015 17:04
GDB output from oss-perf / hphp
(gdb) run '--hphp' '--target' 'hhbc' '--output-dir' '/tmp/hhvm-nginxIOD3Ny' '--input-dir' '/tmp/hhvm-nginxIOD3Ny/drupal-8.0.0-rc1' '--module' '/' '--cmodule' '/' '-l3' '-k1'
Starting program: /usr/bin/hhvm '--hphp' '--target' 'hhbc' '--output-dir' '/tmp/hhvm-nginxIOD3Ny' '--input-dir' '/tmp/hhvm-nginxIOD3Ny/drupal-8.0.0-rc1' '--module' '/' '--cmodule' '/' '-l3' '-k1'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
running hphp...
parsing inputs...
@Kazanir
Kazanir / hhvmnotes.txt
Last active October 12, 2015 16:43
HHVM blockers for Drupal
Blocking Drupal CI (our testbot) working with HHVM:
- Our testbot uses our SQLite driver to store results in a local SQLite database,
even if we are testing using MySQL/MariaDB/Postgres. Unfortunately we use the
unimplemented PDO::sqliteCreateCollation (which is the same as the also-
unimplemented sqlite3::createCollation) method to set up a userland case-
insensitive collation. I might be able to hack out a PR for this myself in spite
of my non-existent C++ though.
- Even if I patch this so the container can run I'm getting weird Reflection errors
@Kazanir
Kazanir / gist:0a3da0f2eb9c8fff988d
Created October 12, 2015 16:34
HHVM blockers for Drupal
Blocking Drupal CI (our testbot) working with HHVM:
- Our testbot uses our SQLite driver to store results in a local SQLite database, even if we are testing using MySQL/MariaDB/Postgres. Unfortunately we use the unimplemented PDO::sqliteCreateCollation (which is the same as the also-unimplemented sqlite3::createCollation) method to set up a userland case-insensitive collation. I might be able to hack this out myself in spite of my non-existent C++ though.
- Even if I patch this so the container can run I'm getting weird Reflection errors that might point to an HHVM problem, but haven't sussed this out yet.
Blocking performance testing:
- I appear to be able to replicate https://github.com/facebook/hhvm/issues/6296 where --hphp builds completely fail. This appears to be broken with oss-performance HEAD on HHVM 3.9.1 as well as with my updates for Drupal RC1. This in turns means I can only test with --no-repo-auth which is sad. :(
Blocking Postgres usage: