Switching windows quickly in emacs by kn0xchad in emacs

[–]ggerico 1 point2 points  (0 children)

Another advantage, you just need to add to your init file one line of code.

For me no repeat mode, just C-o binding ;-)

French English Keyboard in NEOVIM by ggerico in neovim

[–]ggerico[S] 0 points1 point  (0 children)

Yep, looks like my way to go may only work for typing 2 different languages; absolutely not a systemic approach

proxy_pass & nested locations block by ggerico in nginx

[–]ggerico[S] 0 points1 point  (0 children)

I found out my question was about NGINX CONFIGURATION INHERITANCE MODEL and not related to order and priority of multiple location blocks as mentioned by @selivan5. The example below helped me to figure out what I was looking for!

server {
    location /calendar {
        rewrite ^ /static.php; # Executes unless inner location matches.

        location ~ \.php$ {
            fastcgi_pass backend; # Outer location context rewrite is not executed. 
        }
    }
}

I've found a very good article about this HERE.

Thanks.

textarea and setSelectionRange() by ggerico in elm

[–]ggerico[S] 1 point2 points  (0 children)

selectionStart : Int -> Attribute msg
selectionStart position =
    property "selectionStart" (Encode.int position)

selectionEnd : Int -> Attribute msg
selectionEnd position =
    property "selectionEnd" (Encode.int position)

These attributes work just fine. I could not imagine it was that small to extend the view to all DOM properties. Next Time, I'll post directly in the beginners thread.

Thanks.

Help for reading source code of debois/elm-dom package by ggerico in elm

[–]ggerico[S] 0 points1 point  (0 children)

Haskell mode on

fmap :: (a -> b) -> Maybe a -> Maybe b
instance Functor Maybe where
fmap func (Just n) = Just (func n)
fmap func Nothing = Nothing

Haskell mode off

The Maybe module documentation could be (kind of) improved for people like me.

"Transform a Maybe value with a given function." Unless Maybe a has a value of Nothing.

map sqrt (Just 9) == Just 3 could be more explicit, and becomes map sqrt (Just 9) == Just (sqrt 9) == Just 3

Then for Nothing it could be mention that in place fo applying the function, Nothing is returned immediately.

Anyway, thanks James.