... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
Create your new rails application as: | |
rails new <app_name> -T | |
Or remove your test directory from your existing application: | |
rm -rf test/ | |
Make an entry in your Gemfile: | |
gem ‘rspec-rails’ |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
NOTE: a more up-to-date version of this can be found on my blog
A few days ago, version 1.9 of the Nix package manager was released. From the release notes:
nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
This document demonstrates a basic pipeline in Go and talks about a risk in in implementing them. Keep in mind that:
/** | |
* Method extension code | |
*/ | |
fun <T1, T2> Collection<T1>.combine(other: Iterable<T2>): List<Pair<T1, T2>> { | |
return combine(other, {thisItem: T1, otherItem: T2 -> Pair(thisItem, otherItem) }) | |
} | |
fun <T1, T2, R> Collection<T1>.combine(other: Iterable<T2>, transformer: (thisItem: T1, otherItem:T2) -> R): List<R> { | |
return this.flatMap { thisItem -> other.map { otherItem -> transformer(thisItem, otherItem) }} |
using System; | |
using System.Collections.Generic; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
namespace HttpClientApproach | |
{ | |
internal class Contributor | |
{ | |
public string Login { get; set; } |
If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base