(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/env python | |
def curry(func): | |
""" | |
Decorator to curry a function, typical usage: | |
>>> @curry | |
... def foo(a, b, c): | |
... return a + b + c |
Particularly, virtual disks types are very confusing. This document is an attempt to disentangle that and make easier the design of an implementation.
createType: monolithicFlat
createType: 2GbMaxExtentFlat
createType: vmfsPreallocated
module Ruby | |
module Spock | |
def spec(description, definition = nil, &proc_definition) | |
raise ArgumentError if [ definition, proc_definition ].all? {|d| d.nil? } | |
if definition.nil? | |
spec_runner(description, proc_definition) | |
else | |
spec_runner(description, definition) | |
end | |
end |
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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
As I've discovered, managing LXC containers is fairly straightforward, but when building out a system for provisioning out user maintained instances of NodeBB, it was imperative that unprivileged LXC containers were used, so that in the event of shell breakout from NodeBB followed by privilege escalation of the saas
user, the root
user in the LXC container would only be an unprivileged user on the host machine.
During the course of development, I ran into numerous blockers when it came to managing LXC containers in unexpected circumstances. Namely:
su
or executing lxc-*
commands as another user via sudo
lxc-*
commands via a program, application, or script. In my case, a Node.js application.l={};s=m=[];i=pc=mc=0 | |
alias p proc | |
h={'>':p{mc+=1},'<':p{mc-=1},'+':p{m[mc]+=1},'-':p{m[mc]-=1},'.':p{putc m[mc]}} | |
j={'[':->(i){s<<i;->(){pc=l[pc-1]+1 if m[mc]==0}},']':->(i){o=s.pop;l[o]=i;p{pc=o}}} | |
ins=DATA.each_char.map{|c|c=:"#{c}";x=(j[c]||->(_){h[c]||p{}}).(i);i+=1;x} | |
while k=ins[pc];pc+=1;m[mc]||=0;k.();end | |
__END__ | |
[ This program prints "Hello World!" and a newline to the screen, its | |
length is 106 active command characters. [It is not the shortest.] |
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
Response to https://twitter.com/jeffreymaxwell/status/705760483391963136 requiring more than the 77 characters left on Twitter.
DISCLAIMER: The quality of writing and thinking here is aligned with a Twitter conversation, not a blog post, presentation, or book ;-)
Synchronous RESTful communication between Microservices is an anti-pattern ... you seem to being saying that the Netflix architecture (hystrix, eureka, ribbon, ..) is broken ... hmm what would @benjchristensen say?