Skip to content

Instantly share code, notes, and snippets.

Cyrill Schumacher SchumacherFM

Block or report user

Report or block SchumacherFM

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

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
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
// PASS
// ok 3.584s
package main_test
func BenchmarkSearch(b *testing.B) {
@SchumacherFM
SchumacherFM / csv.go
Created Sep 2, 2016
Craig Weber Streaming CSV Parser Prototype | Source https://bitbucket.org/snippets/weberc2/goEb7
View csv.go
package main
import (
"fmt"
"io"
"unicode/utf8"
)
type bufferedReader struct {
r io.Reader
@SchumacherFM
SchumacherFM / magento-nginx.conf
Created Oct 12, 2015 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
View magento-nginx.conf
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
}
@SchumacherFM
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
<?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
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 (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
)
const (
@SchumacherFM
SchumacherFM / DISpeedTest.php
Created Dec 28, 2014
Magento2 Dependency Injection Speed Tester
View DISpeedTest.php
<pre><?php
// call via http://mage2.dev/DISpeedTest.php
// change settings in app/etc/config.php
require('app/autoload.php');
Zend_Debug::dump(ini_get('memory_limit')); // should be > 1536MB
$start = microtime(true);
@SchumacherFM
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"?>
<config>
<global>
<skip_process_modules_updates>1</skip_process_modules_updates>
</global>
</config>
@SchumacherFM
SchumacherFM / Config.php
Last active Mar 4, 2018 — forked from colinmollenhour/Config.php
Magento config.php -> Stampede-Resistant Config Cache
View Config.php
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* 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:
* http://opensource.org/licenses/osl-3.0.php
You can’t perform that action at this time.