Posts

Showing posts from January 15, 2019

Bash script to get API endpoints from spring-boot projects

Image
1 I am writing a bash script to get API endpoints from a java file (maven spring-boot project). echo "$(grep -E '@RequestMapping' userAPI.java)" The above line extracted this following result: @RequestMapping(value = "/users/{userId}", produces = { "application/json" }, method = RequestMethod.GET) @RequestMapping(value = "/users/{userId}/applications", produces = { "application/json" }, method = RequestMethod.GET) My final goal is to get the two endpoints into two variables var1 = "GET /users/{userId}" var2 = "GET /users/{userId}/applications" Please advise what to do next based on the above result? Thanks. I am thinking to use grep and sed, or so on. As a simpler case, how can I just get the endpoints

Google Chart displayed wrong in tab until I resize the window

Image
1 When I click the tab with the Google Chart, first it is showed small and the width style not applied: But when I resize the window, it "jumps" as it should look: I would like to see it from the start as it is scaled in the second picture. Here's one thing I noticed: after it "jumped" to correct format, if I go to a previous tab and resize the window even just a little, when I press the "Macros" tab, it's small again. This is the code: <script src="https://rawgit.com/louisremi/jquery-smartresize/master/jquery.throttledresize.js"></script> <script src="https://www.google.com/jsapi?fake=.js"></script> <script> $(window).on("throttledresize", function (event) { var options = { wi