Saturday, June 8, 2019

React question: which UI framework to choose? And how to allow for easier switching between the frameworks?

https://www.reddit.com/r/reactjs/comments/ba8pxp/react_question_which_ui_framework_to_choose/
Car

And how to allow for easier switching between the frameworks?
level 1
Whatever framework you end up choosing, please think about wrapping the components and importing only the wrapped ones instead of importing straight from the framework. That will allow you to be much more flexible in the future. Also if you are prototyping, that would also allow for easier switching between the frameworks.
level 2
Hey, this sounds pretty reasonable. I'm not much of a js developer myself, since most of the work I did in the past was backend stuff. Do you have some reading material on this topic? Or some examples of how that wrapping would work?
level 3
My workflow is usually like this - the first time I need to use a certain component from a framework, I create a new component, write down the props I'm sure I'll be using and just return the component from the framework with the props passed down to it. So you get the define the component API instead of the framework.
level 2
This is great advice!

6 Popular CSS Frameworks to Use in 2019

Saturday, May 18, 2019

Friday, May 17, 2019

What is an API gateway?

wayscript.com

A new way to build software.

WayScript gives you flexible building blocks to seamlessly integrate, automate and host tools in the cloud. Unlock new potential with drag and drop programming.

From $erverless to Elixir - Elixir, Kubernetes

Subjective Problems vs Objective Problems

https://marcusblankenship.com/30s-to-better-problem-solving/

Excerpt:
"If we perceive an objective problem as subjective (e.g. “2+2=?”) we might end up with an objectively wrong answer. This can have serious repercussions.
If we perceive a subjective problem as objective (e.g. “which web framework is best”?) we may end up fighting a religious war. This may lead to insults, pain, and other casualties of war."

Prometheus related

Thursday, April 25, 2019

CSS for blinking

CSS for blinking


.blink_me {
        -webkit-animation-name: blinker;
        -webkit-animation-duration: 2s;
        -webkit-animation-timing-function: linear;
        -webkit-animation-iteration-count: infinite;
        
        -moz-animation-name: blinker;
        -moz-animation-duration: 2s;
        -moz-animation-timing-function: linear;
        -moz-animation-iteration-count: infinite;
        
        animation-name: blinker;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
    }

    @-moz-keyframes blinker {  
        0% { opacity: 1.0; }
        50% { opacity: 0.2; }
        100% { opacity: 1.0; }
    }

    @-webkit-keyframes blinker {  
        0% { opacity: 1.0; }
        50% { opacity: 0.2; }
        100% { opacity: 1.0; }
    }

    @keyframes blinker {  
        0% { opacity: 1.0; }
        50% { opacity: 0.2; }
        100% { opacity: 1.0; }
    }

Monday, April 1, 2019

Advice about hard work

“You can map out a fight plan. But when the action starts, you are down to your reflexes. That is where your road work shows. If you cheated on that in the dark of the morning, you are getting found out now under the bright lights”. Joe Frazier.

Wednesday, February 13, 2019

ES6 - Chaining functions using Generator Function

Chaining functions using Generator Function

function* doSomething2() {
  yield* [
    () => {
      console.log("hello2");
      gen2.next();
      gen2.next().value();
     },
    () => {
      console.log("world2");
    },
    () => {
      console.log("world22");
    },
  ];
}

var gen2 = doSomething2();

gen2.next().value();


Output:
---------
hello2
world22

ES6 related

Tuesday, January 29, 2019

Rails - ActiveRecord related


Monday, January 28, 2019

Distributed Phoenix Chat using Redis PubSub

Elixir OTP Stock Quotes App (IEX Group)

Developing a Slack Bot in Elixir Phoenix

Whistle - a web framework based on Elixir

https://github.com/boudra/whistle

What problems does Whistle address?

Whistle is a web framework that works a bit differently than normal MVC web frameworks. It is composed of stateful long-running components, allowing you to create interactive applications entirely in Elixir via WebSockets, while being also able to render an HTML page like any other web framework.
It aims to provide a more functional approach to building web apps in Elixir, while also taking more advantage of Erlang's actor model.
It also provides an extensive Javascript API for when Elixir alone doesn't cut it and interop with existing front-end libraries like React is needed.

Avoid these OTP Supervision performance pitfalls

Processing Large CSV files with Elixir Streams

ecommerce - Elixir

Building a new MySQL adapter for Ecto - Plataformatec blog

Elixir Interview Questions

Sunday, January 6, 2019

With Rails UJS, how to submit a remote form from a function

tail + grep (multiple patterns)

https://stackoverflow.com/questions/23395665/tail-f-grep
https://unix.stackexchange.com/questions/37313/how-do-i-grep-for-multiple-patterns-with-pattern-having-a-pipe-character
https://stackoverflow.com/questions/7161821/how-to-grep-a-continuous-stream/7162898#7162898

Example: To grep for "Processing by" & "Parameters:" -
tail -f log/development.log | grep -E "Processing by|Parameters:"

Output:
2019-01-06 14:24:20.030 [INFO ] [30600:1788] Processing by Spree::ProductsController#index as JS

2019-01-06 14:24:20.031 [INFO ] [30600:1788]   Parameters: {"sort_scope"=>"default", "page"=>"12", "infiniteScroll"=>"true"}

Thursday, December 27, 2018

Linux: Prevent SSH timeout

https://bjornjohansen.no/ssh-timeout

In ~/.ssh/config add the following line:

     ServerAliveInterval 30

This will send a “null packet” every 30 seconds on your SSH connections to keep them alive.




Monday, December 17, 2018

ES6 - list of some of the new things

Some of the new things in ES6: 
destructuring, default parameter values, symbols, concise methods, computed properties, arrow functions, block scoping, promises, generators, iterators, modules, proxies, weakmaps, etc

Friday, December 14, 2018

Javascript - this, bind, call

// this , bind, call

var msg = "global";

function f(x){
  console.log(this.msg + "," + x);
}

var obj1 = {
  msg: "obj1",
  f: f
}

var obj2 = {
  msg: "obj2"
}

f(10);
obj1.f(10);
f.call(obj2, 10);

// f.call(window, 10);
// f.call(obj1, 10);
// f.call(obj2, 10);

// f.bind(obj1)(10)
// f.bind(obj2)(10)
// f.bind(window)(10)

Sunday, December 9, 2018

Config in Elixir projects

Excerpt from Elixir Cookbook -
The configuration from the imported files will override any existing configuration (with the same key) in the config.exs file. In fact, Configuration values are merged recursively. See the example at https://github.com/alco/mix-config-example.
To access configuration values, we use Application.get_env(:app, :key)

Friday, November 9, 2018

MySQL Slow Queries

SELECT * FROM `mysql`.slow_log ORDER BY query_time DESC;

Followers

Blog Archive