Skip to content

Instantly share code, notes, and snippets.

View SchumacherFM's full-sized avatar

Cyrill Schumacher SchumacherFM

View GitHub Profile
@mitchellh
mitchellh / archive.md
Last active January 17, 2024 11:17
Archive List

Planned Repo Archive

In the new year, I plan on archiving the repositories below. Because I plan on only archiving the repositories, any project that depends on any of these projects will continue to work. However, I will no longer be accepting issues or pull requests and will never tag a new release.

The reality of each of the projects listed below is that I've almost completely ignored issues and pull requests for

@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@oliveratgithub
oliveratgithub / emojis.json
Last active March 25, 2024 16:37
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@colinmollenhour
colinmollenhour / Update.php
Created August 16, 2016 20:58
Improve Magento Layout Cache Efficiency
<?php
/**
* This rewrite modifies the caching behavior so that the layout cache key references a SHA1
* hash of the layout XML instead of the XML itself to avoid duplication. The layout XML must
* still be generated once for each layout key, but it will not be saved if the identical
* contents already exist, saving considerable cache backend storage.
*/
class Template_Core_Model_Layout_Update extends Mage_Core_Model_Layout_Update
{
@janisz
janisz / bench_test.go
Created March 24, 2016 13:40
Go Free cache vs BigCache
package bigcache
import (
"encoding/binary"
"testing"
"time"
"github.com/allegro/bigcache"
"github.com/coocood/freecache"
)
@Vinai
Vinai / or-example.php
Last active September 28, 2021 20:48
SearchCriteria OR Example for Magento 2
<?php
declare(strict_types = 1);
namespace Training5\VendorRepository\Controller\Test;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\Api\Filter;
use Magento\Framework\Api\FilterBuilder;
@IvanChepurnyi
IvanChepurnyi / Proposal.md
Last active June 26, 2020 22:22
Architectural Proposal for Magento 2 Inventory and Prices Mechanism

Problem

There are too tight relations of stock and prices to store views and websites in Magento that results in high complexity of implementation of b2b and drop shipping solutions in Magento.

The issue was very visible with the price index structure for Magento 1, and now Magento 2 stock index follows the same idea of having an index entry per website.

This strict relation to a website makes unnecessary data duplications in case if you have global stock. Although it makes over complicated multi-warehouse delivery, as you will be required to create a separate website for each warehouse, that duplicates other product data in the flat index structure and price index.

Solution

Create a separate scope entity for Price and Inventory, for using them as scope fields for respective data structures.

@twotwotwo
twotwotwo / sorts.md
Last active December 9, 2023 08:41
Sorting 5x faster with Go: how it's possible, what didn't work so well, and what I learned

github.com/twotwotwo/sorts is a Go package with parallel radix- and quicksorts. It can run up to 5x faster than stdlib sort on the right kind of large sort task, so it could be useful for analysis and indexing/database-y work in which you have to sort millions of items. (To be clear, I don't recommend most folks drop stdlib sort, which is great, and which sorts depends on.)

While the process of writing it's fresh on my mind, here are some technical details, some things that didn't make the cut, and some thoughts about the process:

Concretely, what this looks like inside:

  • Both number and string versions are in-place MSD radix sorts that look at a byte at a time and, once the range being sorted gets down to 128 items, call (essentially) the stdlib's quicksort.

  • The [parallelization code

@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}