Skip to content

Instantly share code, notes, and snippets.

@gtallen1187
gtallen1187 / scar_tissue.md
Created November 1, 2015 23:53
talk given by John Ousterhout about sustaining relationships

"Scar Tissues Make Relationships Wear Out"

04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.

This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.

[Laughter]

> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation

@mattwarren
mattwarren / ClrToStringOverrides.cs
Created May 13, 2015 11:25
Using Cecil to find all the types in "System." assemblies that DON'T override ToString()
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Mono.Cecil;
namespace ClrToStringOverrides
{
internal class Program
{
@hraban
hraban / pre-commit.md
Last active April 18, 2024 06:46
Prevent accidentally committing debug code in Git
@tobiasviehweger
tobiasviehweger / OutlookPSTStoreTodos.cs
Created May 5, 2015 10:11
Enable "Display reminders and tasks from this folder in the To-Do bar" for PST Store programatically
private void EnableStoreTodosAndReminders(RDOStore store)
{
//Enable store for reminders
var reminders = store.Reminders;
reminders.EnableStoreReminders();
//Collection some folders we need
var rootFolder = store.RootFolder;
var taskFolder = store.GetDefaultFolder(rdoDefaultFolders.olFolderTasks);
var inbox = store.GetDefaultFolder(rdoDefaultFolders.olFolderInbox);
@noelwelsh
noelwelsh / Nullable.scala
Created April 17, 2015 10:38
Nullable types in Scala
object Nullable {
sealed trait NullableTag
type Nullable[A] = A with NullableTag
def nullAs[B]: Nullable[B] =
null.asInstanceOf[Nullable[B]]
implicit class ToNullable[A](val a: A) extends AnyVal {
def `?`: Nullable[A] = a.asInstanceOf[Nullable[A]]
}
@orlp
orlp / chacha.h
Last active April 27, 2025 05:42
C++11 ChaCha implementation.
/*
Copyright (c) 2024 Orson Peters <[email protected]>
This software is provided 'as-is', without any express or implied warranty. In no event will the
authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the
@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 28, 2025 12:54
Golang landmines

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@damirarh
damirarh / SetWinStoreSetting.ps1
Created January 17, 2015 15:14
Function for changing a windows Store app setting directly in its settings.app file
function Set-WinStoreSetting {
param (
[Parameter(Mandatory=$true, Position=0)][string]$PackageName,
[Parameter(Mandatory=$true, Position=1)][string]$SettingName,
[Parameter(Mandatory=$true, Position=2)][string]$SettingValue
)
$settingsFile = [IO.Path]::Combine($env:LOCALAPPDATA, 'Packages', $PackageName, 'Settings\settings.dat')
# temporary paths
@stijlist
stijlist / gist:bb932fb93e22fe6260b2
Last active July 12, 2020 06:43
rich-hickey-mastery
Rich Hickey on becoming a better developer
Avatar
Rich Hickey • 3 years ago
Sorry, I have to disagree with the entire premise here.
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.
Mastery comes from a combination of at least several of the following:
@staltz
staltz / introrx.md
Last active May 9, 2025 12:50
The introduction to Reactive Programming you've been missing