Joined July 2013
·

opatry

Earth
·
·

Posted to ZSH, Bower, and command not found over 1 year ago

There is the same issue with *, but you can escape them by wrapping the token with a " pair.

Try this one:

bower install --save "murphyrandle/foobar#some-branch"

Your overall rule is a nice alternative too but may be hard to put in place for development binaries that you want to test with gtest for instance (where * suffer from the same issue with zsh):

./MyCustomDevBinary "--gtest_filter=Foo.*"
Posted to OSX Influenced bash aliases over 1 year ago

alias please="sudo !!" awesome! ^^

Posted to CSS Class Inheritance in CSS over 1 year ago

Additional question: have you some bench/perfs about this usage (vs the classical or preprocessor generated way)?

Posted to CSS Class Inheritance in CSS over 1 year ago

Hi, nice tip!

But can you remember me the current support of [class*=""] selector on navigators?

What is the relation between git, README and the content of your protip?!

I didn't understand your point…

Or you have vcprompt already managing all of that for you in portable manner (bash, zsh, …) without reinventing the wheel ;)

Thanks tor the tip, I'll keep it for later if I need it. But I'm already paying a hosting which is sufficient for my needs (except this one, but this protip is a working and acceptable alternative for me).

(please edit your link which points to pagodapox instead of pagodabox ;) )

Posted to Immutable vs Mutable JAVA over 1 year ago

You talk about performance and you are comparing int and Integer which seems very odd (when chosing Integer over int). Moreover, using the Autoboxing is not the better thing you can do…

Posted to A quicker Mkdir over 1 year ago

Look at the following conversation for further informations about the ! operator:
https://coderwall.com/p/lc8h3q?&p=1&q=

Posted to A quicker Mkdir over 1 year ago

An alternative not so short but without altering your environment:

$ mkdir foo; cd !$

You replace a 3rd variable by an extra array?! What's the point?!
You've listed the caveats of such solution and still you promote it without explaining the benefits of it… (which doesn't exists IMHO), didn't understand your point…

Posted to Accepting the code of others over 1 year ago

I agree too, but there are solutions! First of all, ask someone for the reason of some implementation choices or why something seems wired (if there is still someone to answer that!).
Most of the time you'll have an answer like this one: "yes we were in a hard ruch with a customer and nobody changed it after". Just answer "ok" and go ahead in such cases.

But sometimes, you'll have a question to your question, "why is this newcomers asking me this strange question?!" and then you can discuss and share some experience (if any) and point of view and then improve the overall quality of the code AND the team (or your own if they were totally right)! which is good!

Accept wrong choices, discuss them when you have opened mind interlocutors and listen constructive answers are my best advices around such situation.

Posted to My Bash Prompt over 1 year ago

vcprompt for those who don't know: https://github.com/djl/vcprompt

Little typos: *.cake -> *.cmake.

I'm currently improving my understanding of CMake and C++ (I come from the Java/Ivy world!), I had boostraped a toy project to test and learn on good practices of CMake and C++ library definition. You will find how I deal with Google Test there: https://github.com/opatry/cpp-cmake-template/blob/master/test

For the artifact management flow in C++, there are certainly something to do, but, according to my searches, it's not straightforward. As mentionned previously, the compilation options and defines can be a pain to maintain.
Moreover the split between library binary and library headers is not as simple as Java unique Jar files with extra META-INF available if needed.

There are some stuff around that, like NuGet, but seems very Microsoft oriented (combined with CoApp?).

I found another very interesting one but can't remember its name (something like rydle?), and seems dead project if I remember.

I've got to quite the same solution, using hard coded paths given by ExternalProject_Get_Property but I agree, it's not very nice. I'll check the imported libraries stuff you mentionned.

The problem when doing this way with Git is the large amount of "useless" configuration/orchestration/super-build repositories including the others as submodules and the fact that children repositories won't be standalone anymore…
Here, for instance, you'll need A.git, B.git, C.git, CBuild.git, ABuild.git and the presented use case is quite simple!

When you do not control your server repositories creation, it can be a pain.
For your users/new comers, it requires extra wiki documentation to explain this fact.

For GTest which is built using CMake, I use ExternalProject since I do not modify its sources when dealing with my depending code, but for project needing to modify both sides, I procede with submodules and a configuration top level repository.

The ideal solution here is to deal with already built artifact stored in an artifact repository. This is the preferred and effective way used in Java world with Ivy or Maven.
The difficulty in the C/C++ world is to keep information on compilation options which are very important for depending code.

Okay, get the difference. This visual effect is definitely associated to finite progress to me.

It quite hard to represent undetermined (or hard to determine precisely) task time, but this one is certainly an acceptable answer! Not the best to me, that's all ;)

So, the animation time isn't related to content downloaded asynchronously?
It just says "we are doing something a bit long"?
I may be better to use an infinite wheel, no?

but nice explanation of the feature!

I assume you speak for Google Chrome (or Chromium)?
Same on PC, Ctrl+Shift+T.

Can reopen several windows (and their nested tabs), useful after a forced reboot (do this shortcut as many times as you have closed windows to reopen).

Posted to Sonar: Preserve Stack Trace over 1 year ago

Nested exception constructor doesn't works for Sonar default rule?

What if you want to explicitely throw SAMLNoFoundException (or WhateverMyException) and not XPathExpressionException?

Using an object as argument allows more arbitrary/optional combinations/order of arguments.

But it requires more documentation (which is good!)

function foo(params){
    params = params || {};
    params.bar = params.bar || "something";
    params.baz = params.baz || "defaultValue";
}
Posted to `cat` syntax highlighting over 1 year ago

(my last comment didn't get published…)
Finally, the answer is very simple, I missed the quotes around the command alias definition --'

Works fine now, thanks for the tip.

Posted to `cat` syntax highlighting over 1 year ago

Ok, got it, I missed the quotes on the alias definition… works fine now, nice tip!

Posted to `cat` syntax highlighting over 1 year ago

@borisguery I'm using zsh too but on GNU/Linux.

Running directly pygmentize -g test works fine but when using an alias defined in my ~/.profile, I get this error:

alias ccat=pygmentize -g
$ ccat test
Error: no lexer for filename 'test' found

Direct pygmentize usage works like a charm:

$ pygmentize -g test
Some normal text

Very strange behavior…

Posted to `cat` syntax highlighting over 1 year ago

It seems that this pygmentize -g doesn't works for regular files and doesn't silently fail. I use a ccat alias instead, any idea for smarter way?

edit I miss the quote around the alias definition in my ~/.profie file /edit

Achievements
105 Karma
5,115 Total ProTip Views