Skip to content

Instantly share code, notes, and snippets.

View khepin's full-sized avatar

Sebastien Armand khepin

  • San Francisco, USA
View GitHub Profile

thorsten 9:42 AM

Just had a (great) conversation about ownership and engineering here and I realized that I often use the phrase "ownership" or allude to it, but haven't explained what "ownership" means to me in a while.

So, ownership. If I ask you "can you own this?" or "can you take care of this?" or "are you on it?" — I'm asking you to own it, to own the solution of a problem from end to end. From "we have a problem" to "we don't have to think about it again."

That means, when you say that you're owning something, the expectation is that you

  • Think about what the problem actually is. Maybe you already have a solution in mind, without having thought about what we're actually trying to solve here. Maybe you think "the problem is that we need to migrate from using X to using Y", but that's not a problem, that's a solution. The problem is likely something like "performance is bad", "it's not stable", "it fails for customer x". Maybe there's other possible solutions to that? Think about those. What are
package requestcontext
type RequestLogger struct{}
type User struct{}
type RequestContextValues struct {
Logger RequestLogger
User User
}
@khepin
khepin / cookies.js
Last active February 16, 2018 04:06
console.log('reading cookies');
console.log(document.cookie);
console.log('finished reading cookies');
<?php
$parentClass = 'Some\Class\Name';
$anonObject = new class() extends $parentClass {};
<?php
class CreativeMarket_Sniffs_Functions_FunctionLengthSniff implements PHP_CodeSniffer_Sniff
{
const MAX_NUM_LINES = 30;
/**
* Returns an array of tokens this test wants to listen for.
*
* @return array
if (!function_exists('debuglog')) {
function debuglog($message) {
if (!is_string($message)) {
$message = print_r($message, true);
}
$message .= "\n";
$dir = ROOT . '/../logs/';
if (!is_dir($dir)) {
mkdir($dir);
}
/*
Le browser ne trigger aucun "blur" tant que la fenêtre du browser n'est pas active.
Ca peut se vérifier via un simple script dans ta console que tu laisses tourner avec un compteur de "blur"
Du coup on s'était résiliés à une fonction helper qui injecte du JS dans la page et
déclenche manuellement le "blur"
*/
function blurElement(selector) {
element(by.css(selector)).sendKeys(protractor.Key.TAB); // Element cannot have focus.
<span translate>Hello</span>
<!-- This one works standard, normal, no issues -->
<span translate>{{ widget_title }}</span>
<!-- How about this case? -->
/**
* This defines a simple widget
*/
function simpleWidget(){};
simpleWidget.$tags = [
{name: 'widget', value: {width: 1, height: 1}}
];
/**
* This defines a more complex one that depends on other services
swiftmailer:
spool: { type: memory }
transport: smtp
host: mailtrap.io
username: xxxxxxxx
password: xxxxxxxx
encryption: ~
auth_mode: plain
port: 2525