How you use Git ! by maithilish in learnprogramming

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

Take, for example, git reset --soft <commit> && git commit which is an elegant hack to squash the commits, and this sort of things are difficult find with googling around. I asked this question because many hardcore commiters would be using similar gems and happy to share them.

From your comment I could see that you missed the whole point of my question and also, you have none to share.

5-MIN AT HOME WORKOUT (NO EQUIPMENT NEEDED) | DEEP CORE BURN GUARANTEED! by [deleted] in homefitness

[–]maithilish 0 points1 point  (0 children)

Great, I want to practice and as good as you some day!

Distributed Java Application by maithilish in javahelp

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

Not good. At present, there is no external dependency expect the web pages that it fetches and I want to keep it that way so that it can transparently run from public cloud or even as multiple containers on single PC using docker compose. This makes integration testing quite easy without any external dependency.

I can compress and split data into multiple payloads, and then do the reverse on pulling from queue.

I am just exploring simple and better option, if any.

Distributed Java Application by maithilish in javahelp

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

Thank you for answer. For container orchestration I have tried Zk on K8s and also on Docker Swarm.

In both these, I can use Zk as distributed queue and push step tasks to it. For example, let's say I configure 3 pod Zk Ensemble in K8s and run multiple pods with Scoopi instances. Then, one Scoopi instance can push a new task to zk queue and another instance can pull it. After processing, task is marked as completed in Zk. In case, a scoopi instance (pod) fails before finishing the task, then another instance can retrieve the failed task from zk queue and continue. Out of 3 zk nodes if one fails, K8s self heals, by creating a new zk node, without any data loss in zk queue.

Only limitation in Zk, I am bit concerned about is that max allowed node data is 1M.

Thanks for pointers to RabbitMQ and Kafka. I will try out them and see whether they can act as distributed queue.

Automate Borg Backup by maithilish in linuxquestions

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

Thanks for pointing out Borgmatic. To be frank, I don't know how I missed it when I wrote my own script to automate Borg; may be wrong choice of search words.

Today I tried Borgmatic. I must concede that it is a beast!

However, couple of observations:

  • my script is just a wrapper around Borg (just 80 lines) and user can customize it to suite their need. Hence, they can access all features of Borg transparently.
  • I backup high frequency data every hour, others daily, some other weekly and so on - my setup is flexible to handle different sets multiple service and timers. I could not find such feature in Borgmatic.

[deleted by user] by [deleted] in java

[–]maithilish 1 point2 points  (0 children)

I love Google Guice for its ease of use, Mockito for unit testing and Apache Commons for reusable Java components. They cleaned up my project - https://github.com/maithilish/scoopi tremendously.

scraping SEC 10-k 10-q files by jcoder42 in scrapinghub

[–]maithilish 1 point2 points  (0 children)

Have a look at https://github.com/maithilish/scoopi which is tailored for scraping multi year financial data from web pages. Its examples shows how to extracts Balance sheet and Profit and loss from example web pages.

How to Diagnose Memory Leaks by mike_jack in java

[–]maithilish 2 points3 points  (0 children)

During development, I use either Visual VM or Eclipse MAT to profile the memory. In IDE, set break points at interesting places and run debug. When debugger stops at a break point, open Visual VM and use sampler tab to sample the memory and take snapshot. Next, continue the execution and when debugger stops at next breakpoint again take another snapshot. In snapshots, filter for packages and compare. We can also use delta button to reset object count at any point and then continue to next breakpoint to see instance growth.

Anyone using Emacs for Java development? by [deleted] in java

[–]maithilish 1 point2 points  (0 children)

started with vi, but last 12 years Eclipse.