Posts

Copying files from/to Docker container

docker cp foo.txt mycontainer:/foo.txt docker cp mycontainer:/foo.txt foo.txt

Math in Vim search and replace

In Vim, you can use function or math in search and replace. 7100,111,222,0 7100,333,444,1 7100,555,666,2 :%s/\(\d*\)$/\=2-submatch(1)/g 7100,111,222,2 7100,333,444,1 7100,555,666,0

HOW THE INDUSTRY BROKE THE CONNEXTRA TEMPLATE

from: http://antonymarcano.com/blog/2016/08/how-the-industry-broke-the-connextra-template/ Apples, Oranges and User Stories Read this on medium.com via  ideas.riverglide.com . Imagine you’d never seen an orange or an apple before. Then, imagine you read a few articles showing an image of a shiny, red fruit, saying – “This is an orange, it will help you with your vitamin C deficiency”. It’s a similar shape to the foods you’ve eaten for other vitamin deficiencies so still fits your model. You proceed to eat lots of this red, shiny, crunchy, refreshing fruit and you teach your colleagues the same. Now they’re eating “oranges”… “You keep using that word, I do not think it means what you think it means.” After some time, your vitamin C deficiency still hasn’t improved. So everyone says “down with oranges, they don’t work”—including the some of the authors who’s articles you’d read. The problem was that you were eating apples, not oranges. But it’s too late, you, your colleagues,

Open Source Integration with Apache Camel and How Fuse IDE Can Help

Image
from: https://dzone.com/articles/open-source-integration-apache Take any integration project and you have multiple applicationstalking over multiple transports on multiple platforms. As you can imagine, inlarge enterprise applications this can get complex very fast. Much of thecomplexity stems from two issues: 1.dealing with the specifics of applications and transports, and 2.coming up with good solutions to integration problems. Making your applications speak transports and APIs is relatively easy on its own. I'm sure everyone knows how to send JMS messages to their broker of choice; though it still requires in depth knowledge of the JMS specification, which many developers may not have. On top of that, what happens when you want to route that JMS message to another application? You then have to take care of mapping the JMS message to the application plus handle any new concepts related to the application. Add a dozen other applications into the mix and you've got qui

Variables and scoping in ECMAScript 6

http://2ality.com/2015/02/es6-scoping.html This blog post examines how variables and scoping are handled in ECMAScript 6  [1] . Block scoping via  let  and  const    Both  let  and  const  create variables that are  block-scoped  – they only exist within the innermost block that surrounds them. The following code demonstrates that the  let -declared variable  tmp  only exists inside the then-block of the  if  statement: function func ( ) { if ( true ) { let tmp = 123 ; } console .log(tmp); // ReferenceError: tmp is not defined } In contrast,  var -declared variables are function-scoped: function func ( ) { if ( true ) { var tmp = 123 ; } console .log(tmp); // 123 } Block scoping means that you can shadow variables within a function: function func ( ) { let foo = 5 ; if (···) { let foo = 10 ; // shadows outer `foo` console .log(foo); // 10 } console .log(foo); // 5 } const  creates immutable variabl