Skip to content

Instantly share code, notes, and snippets.

@speric
speric / margarita.md
Created May 15, 2020 19:35 — forked from moklett/margarita.md
The Perfect Margarita

The Perfect Margarita

This is my "go to" margarita because of the ease of preparation and the simplicity of ingredients.

TL;DR

1oz orange liqueur, 2oz tequila, 3oz limeade, 1/2 lime, shaken with ice.

@moklett
moklett / doublesplat.rb
Last active October 4, 2017 16:18
Ruby Double Splat is a bit like Javascript Spread
a = { a: "a" }
b = { b: "b" }
{ **a, **b }
#=> {:a=>"a", :b=>"b"}
{ z: "z", **a, **b }
#=> {:z=>"z", :a=>"a", :b=>"b"}
{ a: "AAA", **a, **b }

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@jeremywrowe
jeremywrowe / ember-data-1.13-cheatsheet.md
Created August 17, 2015 17:00
Ember Data v1.13.x Cheatsheet

Ember Data v1.13.x Cheatsheet

Things to remember

  • If you return a promise beforeModel, model, and afterModel in a route, it will wait to resolve the promise before transitioning into the route. This is helpful when using loading and error substate templates.

  • All ember data records go into a global cache. There is not a cache per query,

I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal

I certainly use a black background. I'm not sure about the other RSpec core folks. Regardless, if there are some color changes we can make that would make output look good on a larger variety of backgrounds, we'll certainly consider that (do you have some suggested changes?). In the meantime, the colors are configurable, so you can change the colors to fit your preferences on your machine. First, create a file at

@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

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:

@JunichiIto
JunichiIto / alias_matchers.md
Last active April 16, 2024 16:18
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@xpepper
xpepper / good_styling.md
Created July 15, 2014 13:43
A quote on "styling" by Kent Beck's "Smalltalk Best Practice Patterns"

"There are a few things I look for that are good predictors of whether a project is in good shape. These are also properties I strive for in my own code.

  • Once and only once - If I only have one minute to describe good style, I reduce it to a simple rule: In a program written with good style, everything is said once and only once. This isn't much help in creating good code, but it's a darned good analytic tool. If I see several methods with the same logic, several objects with the same methods, or several systems with similar objects, I know this rule
@moklett
moklett / margarita.md
Last active August 31, 2020 14:13
The Perfect Margarita

The Perfect Margarita

This is my "go to" margarita because of the ease of preparation and the simplicity of ingredients.

TL;DR

1oz orange liqueur, 2oz tequila, 3oz limeade, 1/2 lime, shaken with ice.

[mysqld]
innodb_flush_method=nosync
default-storage-engine = innodb
innodb_flush_log_at_trx_commit = 0
innodb_doublewrite = 0