Skip to content

Instantly share code, notes, and snippets.


Cyrill Schumacher SchumacherFM

View GitHub Profile

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

SchumacherFM / binarySearch.go
Created Dec 1, 2016
Binary Search vs Loop Search
View binarySearch.go
// /usr/local/go-master/libexec/bin/go test -v . -bench ^BenchmarkSearch$ -run ^$
// Loop 20000 68347.0 ns/op 0 B/op 0 allocs/op
// Binary 30000000 47.9 ns/op 0 B/op 0 allocs/op
// ok 3.584s
package main_test
func BenchmarkSearch(b *testing.B) {
SchumacherFM / csv.go
Created Sep 2, 2016
Craig Weber Streaming CSV Parser Prototype | Source
View csv.go
package main
import (
type bufferedReader struct {
r io.Reader
SchumacherFM / magento-nginx.conf
Created Oct 12, 2015 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source:
View magento-nginx.conf
# This is an annotated subset of the Nginx configuration from our Magento production platform @
# See
user app;
worker_processes 4;
pid /var/run/;
events {
worker_connections 768;
SchumacherFM / Trackingnumber.php
Created May 6, 2015
Magento1: How not to load models/collections in a grid renderer. This shows a very bad example 😞. Do not use it or 🔫.
View Trackingnumber.php
@SchumacherFM: The render() method is executed in each row
* Product: Vendor_GridActions
* ID:
* File: app/code/local/Vendor/GridActions/Block/Adminhtml/Sales/Order/Grid/Widget/Renderer/Trackingnumber.php
View gist:9c4b112fcb03b21a89be
bolt 5000 277963 ns/op
redis 30000 48081 ns/op
pg 10000 149691 ns/op
Yes, the Bolt transactions could be batched. But so too could the PG transactions,
and the Redis work could be pipelined. And that isn't always a workable solution.
import (
SchumacherFM / db.go
Created Feb 15, 2015
GoLang Database SQL: Selecting an unknown amount of columns from a query. Benchmark results in db_test.go
View db.go
package main
import (
_ ""
const (
SchumacherFM / DISpeedTest.php
Created Dec 28, 2014
Magento2 Dependency Injection Speed Tester
View DISpeedTest.php
// call via
// change settings in app/etc/config.php
Zend_Debug::dump(ini_get('memory_limit')); // should be > 1536MB
$start = microtime(true);
SchumacherFM / local.xml
Last active Aug 29, 2015 — forked from alistairstead/local.xml
Magento local.xml skip_process_modules_updates
View local.xml
<?xml version="1.0"?>
SchumacherFM / Config.php
Last active Mar 4, 2018 — forked from colinmollenhour/Config.php
Magento config.php -> Stampede-Resistant Config Cache
View Config.php
* Magento
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: