↓ Skip to main content

Tools

Gitbits

·262 words·2 mins
Two small utilities I have places into ~/bin: git-attic # Source: https://github.com/maximeh/dotfiles/blob/master/common/.bin/git-attic #!/bin/sh # git-attic [-M] [PATH] - list deleted files of Git repositories # # Use -M to not show renamed files, and other git-log options as you like. git log --raw --no-renames --date=short --format="%h %cd" "$@" | awk '/^[0-9a-f]/ { commit=$1; date=$2 } /^:/ && $5 == "D" { print date, commit "^:" $6 }' | less Example # ➜ kubernetes-the-hard-way git:(master) ✗ git log --raw --no-renames --date=short --format="%h %cd" "$@" | awk '/^[0-9a-f]/ { commit=$1; date=$2 } /^:/ && $5 == "D" { print date, commit "^:" $6 }' 2019-11-20 374e8d9^:docs/using-rst/pdp-template-rst.rst 2019-11-17 7911114^:src/certificates/admin-csr.json 2019-11-17 7911114^:src/certificates/admin-key.pem 2019-11-17 7911114^:src/certificates/admin.csr 2019-11-17 7911114^:src/certificates/admin.pem 2019-11-17 7911114^:src/certificates/ca-config.json 2019-11-17 7911114^:src/certificates/ca-csr.json 2019-11-17 7911114^:src/certificates/ca-key.pem 2019-11-17 7911114^:src/certificates/ca.csr 2019-11-17 7911114^:src/certificates/ca.pem 2019-11-17 7911114^:src/certificates/copy-certificates-to-servers.sh git trail # I cannot remember where is this one from :-(

Better dynadmin

·135 words·1 min
Source of the fix is https://github.com/jc7447/BetterDynAdmin. This is to capture the installation process and provide backup in case the tool disappears. The pages generated by DynAdmin are actually not coming from a JSP or JHTML pages. The HTML you see is generated by hardcoded servlets. Each Nucleus component has assigned Admin servet, which is called when DynAdmin is trying to render the page. The improvent here are user scripts - running inside Firefox or Chrome, utilizing infrastructure provided by Greasemonkey extension (FF) or Tampermonkey (Chrome).

Finding out the class in ATG installation

·845 words·4 mins
Java approach # Use the real time search with this JAR - https://jarscan.com/ ➜ scripts git:(authoring) ✗ java -jar ~/bin/jarscan.jar ========================= JarScan written by Geoff Yaworski gyaworski@hotmail.com Version 2.0 ========================= Usage: java -jar jarscan.jar [-help | /?] [-dir directory name] [-zip] [-showProgress] <-files | -class | -package> <search string 1> [search string 2] [search string n] Help: -help or /? Displays this message. -dir The directory to start searching from default is "." -zip Also search Zip files -showProgress Show a running count of files read in -files or -class Search for a file or Java class contained in some library. i.e. HttpServlet -package Search for a Java package contained in some library. i.e. javax.servlet.http search string The file or package to search for. i.e. see examples above example

GVM

Installed GVM from: http://gvmtool.net ~ $ curl -s get.gvmtool.net | bash Thanks for using _____/\\\\\\\\\\\\__/\\\________/\\\__/\\\\____________/\\\\_ ___/\\\//////////__\/\\\_______\/\\\_\/\\\\\\________/\\\\\\_ __/\\\_____________\//\\\______/\\\__\/\\\//\\\____/\\\//\\\_ _\/\\\____/\\\\\\\__\//\\\____/\\\___\/\\\\///\\\/\\\/_\/\\\_ _\/\\\___\/////\\\___\//\\\__/\\\____\/\\\__\///\\\/___\/\\\_ _\/\\\_______\/\\\____\//\\\/\\\_____\/\\\____\///_____\/\\\_ _\/\\\_______\/\\\_____\//\\\\\______\/\\\_____________\/\\\_ _\//\\\\\\\\\\\\/_______\//\\\_______\/\\\_____________\/\\\_ __\////////////__________\///________\///______________\///__ Will now attempt installing... Looking for a previous installation of GVM... Looking for JAVA_HOME... Validating JAVA_HOME... Looking for unzip... Looking for curl... Installing gvm scripts... Create distribution directories... Create candidate directories... Download script archive... Extract script archive... Install scripts... Make init script executable... Prime config file... Attempt update of bash profiles... Updated existing /Users/miro/.bash_profile Updated existing /Users/miro/.profile Updated existing /Users/miro/.bashrc Attempt update of zsh profiles... Created and initialised /Users/miro/.zshrc Clean up local variables... All done! Please open a new terminal, or run the following in the existing one: source "/Users/miro/.gvm/bin/gvm-init.sh" Then issue the following command: gvm help Enjoy!!! Using # binsh $ gvm current Using: groovy: 2.0.6 grails: 2.2.0 griffon: 1.1.0 gradle: 1.3 vertx: 1.3.0.final Fix for zsh # http://blog.andresteingress.com/2012/12/14/gvm-the-groovy-environment-manager/

Discovered Trello

·73 words·1 min
Finally a todo/task/project management system that is very good fit. Here is why: is pretty visually modern and dynamic UI has Web back-end (usable from Linux VM) has decent iPhone app allows checklists (multiple) allows color coding Markdown support ecosystem There is Gmello that allows create card from GMail, plus few others that seem to bridge the gap between Evernote, System XYZ and Trello http://trello.com Courtesy of Fog Creek / Joel Spolsky’s company

Fixing Git plugin for Sublime Text 2

·105 words·1 min
After update, the ST2 started to complain about missing git command. Finding out Git on MBP: platform $ which git git is /usr/bin/git git is /usr/local/bin/git platform $ git --version git version 1.7.7.5 (Apple Git-26) platform $ /usr/bin/git --version git version 1.7.7.5 (Apple Git-26) platform $ /usr/local/bin/git --version git version 1.7.3.2 Fix the the Package file in /Users/miro/Library/Application Support/Sublime Text 2/Packages/Git - Git.sublime-settings (it is JSON file)

ATG module graph

Notes from weekend hack: # Project is in Bitbucket - https://bitbucket.org/miroadamy/atgdiagram/overview Run # in Diagrams/ATGDiagram Radegast:ATGDiagram miro$ groovy -cp src src/listATGModules.groovy -e -m TWeStore.eStore >uml/test2.uml Radegast:ATGDiagram miro$ ./processUml.sh uml/test2.uml Radegast:ATGDiagram miro$ open uml/test2.png Radegast:ATGDiagram miro$ => Output test2.uml the ‘.’ in names is converted to ‘_’ - GraphViz does not like it the ‘-’ in names detto Using ATG_ROOT from environment variable $ATG_ROOT: /opt/ATG/ATG10.0.2 Using /opt/ATG/ATG10.0.2 installation Dependants of module TWeStore.eStore => [DCS.Search.Query, B2CCommerce, DAF.Search.Query, DAF.Search.Base, DCS.Search.common, DPS.Search.Index, DAF.Search.common, DAS-UI, DCS.Search.Index, DPS, DCS, DCS.Search.CustomCatalogs, DCS.Search.CustomCatalogs.Query, DCS.Search.CustomCatalogs.Index, DAF.Search.Routing, DCS.Search.CustomCatalogs.common, DAF.Search.Index, DSS, DCS.CustomCatalogs, DAS] @startuml Object TWeStore_eStore Object DCS Object B2CCommerce Object DCS_Search_CustomCatalogs Object DAF_Search_Routing Object DCS_CustomCatalogs Object DPS Object DCS_Search_CustomCatalogs_Query Object DAF_Search_Base Object DCS_Search_CustomCatalogs_Index Object DSS Object DAS_UI Object DCS_Search_Query Object DCS_Search_CustomCatalogs_common Object DAS Object DCS_Search_Index Object DAF_Search_Query Object DCS_Search_common Object DPS_Search_Index Object DAF_Search_Index Object DAF_Search_common TWeStore_eStore <|-- DCS TWeStore_eStore <|-- DCS_CustomCatalogs TWeStore_eStore <|-- B2CCommerce TWeStore_eStore <|-- DCS_Search_CustomCatalogs TWeStore_eStore <|-- DAF_Search_Routing DCS <|-- DPS DCS <|-- DSS B2CCommerce <|-- DCS DCS_Search_CustomCatalogs <|-- DCS_Search_CustomCatalogs_Index DCS_Search_CustomCatalogs <|-- DCS_Search_CustomCatalogs_Query DAF_Search_Routing <|-- DAS_UI DAF_Search_Routing <|-- DAF_Search_Base DCS_CustomCatalogs <|-- DCS DPS <|-- DAS DCS_Search_CustomCatalogs_Query <|-- DCS_Search_Query DCS_Search_CustomCatalogs_Query <|-- DCS_Search_CustomCatalogs_common DAF_Search_Base <|-- DAS_UI DCS_Search_CustomCatalogs_Index <|-- DCS_Search_Index DCS_Search_CustomCatalogs_Index <|-- DCS_Search_CustomCatalogs_common DSS <|-- DPS DAS_UI <|-- DAS DCS_Search_Query <|-- DAF_Search_Query DCS_Search_Query <|-- DCS_Search_common DCS_Search_Query <|-- DCS DCS_Search_CustomCatalogs_common <|-- DCS_Search_common DCS_Search_CustomCatalogs_common <|-- DCS_CustomCatalogs DCS_Search_Index <|-- DPS_Search_Index DCS_Search_Index <|-- DCS_Search_common DCS_Search_Index <|-- DCS DAF_Search_Query <|-- DAF_Search_common DCS_Search_common <|-- DAF_Search_common DCS_Search_common <|-- DCS DPS_Search_Index <|-- DPS DPS_Search_Index <|-- DAF_Search_Index DAF_Search_Index <|-- DAS_UI DAF_Search_Index <|-- DAF_Search_Base DAF_Search_common <|-- DAS_UI DAF_Search_common <|-- DAF_Search_Base DAF_Search_common <|-- DAF_Search_Routing @enduml Visualization (uml/test2.png) #

Diagram generation - plain text approach

·311 words·2 mins
GraphViz # installed from package See http://www.graphviz.org/ Radegast:diagrams miro$ dot -V dot - graphviz version 2.28.0 (20110509.1545) Radegast:diagrams miro$ which dot dot is /usr/local/bin/dot SchemaSpy # installed in /opt/diagrams see http://schemaspy.sourceforge.net/ Radegast:schemaSpy miro$ java -jar ./schemaSpy_5.0.0.jar -cp .:/Users/miro/lib/java/jdbc/mysql-connector-java-5.1.7-bin.jar -t mysql -o library -host localhost -u twt_dX_core -db twt_dX_core -p twt_dX_core Using database properties: [./schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/mysql.properties Gathering schema details....................................................................................................................................................................................................................................................................................................................................................(36sec) Writing/graphing summary..... .......(353sec) Writing/diagramming details.................................................................................................................................................................................................................................................................................................................................................(104sec) Wrote relationship details of 337 tables/views to directory 'library' in 494 seconds. View the results by opening library/index.html Radegast:schemaSpy miro$ Radegast:schemaSpy miro$ ll total 904 PlantUML # installed in /opt/diagrams manual is attached: PlantUML Language Reference Guide.pdf See http://plantuml.sourceforge.net/classes.html in /opt/plantUML-DEMO/ there are sample files @startuml img/sequence_img009.png Alice -> Bob: Authentication Request alt successful case Bob -> Alice: Authentication Accepted else some kind of failure Bob -> Alice: Authentication Failure group My own label Alice -> Log : Log attack start loop 1000 times Alice -> Bob: DNS Attack end Alice -> Log : Log attack end end else Another type of failure Bob -> Alice: Please repeat end @enduml