Posts

Showing posts with the label Productivity

Mac keyboard shortcut to copy file path as markdown

Image
The macOS productivity 1 shortcut to Copy file/folder markdown path. How to create macOS Automator Quick Action to copy the file/folder markdown path using shortcut keys as the same way you copy the path name of the file/folder. I give you an idea of how to use JXA in the Automator . As additional information, I introduce how to use macOS Cocoa that will help you to make better logging using macOS Console application. Why is this blog ? JXA support Cocoa support Logging support Create Quick Action Testing using macOS Automator Reference If you are macOS Automation 2 fan to self-improvement of your productivity, the first book to read is Cognitive Productivity with macOS®: 7 Principles for Getting Smarter with Knowledge . This adopt the concepts from the Summary: The 7 Habits Of Highly Effective People by Stephen R.Covey - More knowledge in less time to macOS 👍🏼. Why is this blog ? Almost all of my blogs are now written in Markdown format. And...

How to create step guides

Image
Flow to create step guide Screen annotation in Mac Flow to create step guide Most of the bloggers need to add stories to their blog posts. For tech bloggers, that is most probably the journey of clicks over browser, application and so on. However, the blogger has to capture the screen and record with the annotations. In this blog, I explain how to create step by step guide: graph TD A[Start walk through] --> B(Take screenshot) B --> C{more to go ?} C -->|Yes| B C -->|No| D[Annotate Screenshot] D --> E{more to annotate ?} E -->|Yes| D E -->|No| F[Create Guide] As shown in the above Flow chart, you have to annotate all the screenshots first, as explained in the below section. In the end, you have to add those screenshot to the editor like Typora Typora . You can use uPic integration of Typora to auto-upload pictures to cloud. You can write a complete step by step guide in the Typora. Screen annotation in Mac Step 1: Press Cmd...

Toolbox for bloggers

Image
CONTENTS Animated GIF for terminal recording Diagrams and Charts Write a blog post Math notations Create step guides Animated GIF for terminal recording The LICECap is nice free little tool good to create animated gif show your terminal for example. Fig 1: Python version on terminal It is hard to find the similar Diagrams and Charts Although there are few diagrams types and charts, I am very happy with mermaid . The advantage of using mermaid is its dependency only on browser: no need to access outside services to create chart or diagram. pie title Top 5 COVID-19 (31/05/2020) "USA" : 1815856 "Brazil" : 498440 "Russia" : 396575 "Spain": 286308 "Rest of the world":2879467 It is hard to find similar free tools. If anyone knows, please don't forget to share with me. Write a blog post If you are interesting how I write my blog posts, please read the Markdown blog write...

MAC shortcuts

Image
Here the simple mac shortcuts found from the difference sources such as 1 . Here the general tips: Mac keyboard shortcuts from Apple Support. run the caffeinate in the terminal to keep the computer wake unlimitedly 2 . Expand print dialog box by default: defaults write -g PMPrintingExpandedStateForPrint -bool TRUE Enable or disable character accent menu: // disable defaults write -g ApplePressAndHoldEnabled -bool false Add Dock space. defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' killall Dock Dock transition delay. defaults write com.apple.dock autohide-time-modifier -float 0 killall Dock Spotlight In the spotlight, once find the file, hold down the CMD key to show the location of the file bottom of the window if you press CMD+R, the file will be show in the file explorer. Browser Some important browser shortcuts Functionality Browser Key Combination To show th...

Learn to Learn

Image
Recently I have been through the 1 and 2 . Here is some notable things to remember as an effective learner. The idea is to study more is not necessarily effective. Instead, it may worst the performance. One of the underlying theory is that things are reinforced when we tend to do more off. Things that are punished or ignored when manage to do less off.  Rules It is worth to note down few rules 1. Rule the moment you started to slide, you're shovelling against the tide.: take a break. Pomodoro technique there are two modes in your brain _focus mode_: tight pattern of Knowledge control your thinking. There is very less opportunity to grasp the new things or being creative. _diffuse mode_: the relax mode. Models of knowledge are weakened. Ready for the new concepts.  This technique needs to be trained. However, most difficult is getting to the focus mode again. But it is important to switch between these modes as shown as above. 2. Rule Create a stu...

Intellij Idea for Scala

I am using IntelliJ more than 5 years now and eventually became a fan of that. I used both Ultimate edition and community edition. The community edition Scala plugin is well established now compared to 2 years back. However, there are a number of important productivity topics to discuss here. Copy Scala worksheet For example, I want to copy the Scala worksheet to the text editor sublime. Here the steps you need to follow 1. in the IntelliJ, enable column selection mode by CMD+SHIFT+8 2. Select the text you want to copy (for example first the left side of the split screen where Scala source is available) 3. Paste the copied text sublime new file CMD + N 4. In the Sublime now press the CMD + OPTION + F to search and replace. 5. Enable the regex, and search the $ (end of the line) and replace <space>//<space> and click the replace all. 6. Now back to the IntelliJ Idea and selecting the other side ( right side of the split screen where the results are) after CMD+SH...

Blog Writing Workflows

Image
I have used the workflow of Markdown blog writer for blogger for around two years. The main problem with this approach was the image manipulation. I have to separately upload the images to google photos. However later found the iPic image upload app which work with typora . But following two work flows are efficient as I found. Blog workflow this is how I create my new blogs. The basic tools are as follows: iPad Apple pencil MWeb app here the benifs of this workflow: I can work on same document both iPad and the mac computer Mweb support images and Malh for my documents In addion to that , Mweb publishes the web blog post to my Blogger site. The best is images are automatically upload to the google photos. Same post can be publish number of time, but Mweb keep track of images without duplicating. I use third party app sueh as Good Note 4 to create the diagram. For example following diagram was drawn from the DrawExpress App.  As shown in the above diagram, ...

MSSQL on Mac

I was inspired to write this simple blog after reading the Microsoft Migrate a SQL Server database from Windows to Linux using backup and restore .This article about how to restore the AdventureWork on Linux, but this blog about MSSQL server 2017 on Mac OS Sierra. MSSQL available as a docker image to install on Mac. If you have Docker installed in your Mac, simple to install with two commands as shown in the http://aka.ms/sqldev site: docker pull microsoft/mssql -server -linux docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433 : 1433 -d microsoft/mssql -server -linux After the docker installation, login to the doker: docker exec -i -t < CONTAINER ID > /bin/bash Create a new folder “backup” in the “/var/opt/mssql”. If you are not admin run the command sudo su to login as super user. cd /var/opt/mssql/ mkdir backup Your work as admin in the docker is finished. Download the AdventureWork from https://msftdbpro...

Markdown blog writer for blogger

Image
CONTENTS Why new blog writer Workflow Typora StackEdit Math Support Complex Math Icons are well supported Flowcharts Image support Syntax Highlighter Conclusion Why new blog writer I was curious to find a new blog writher after some experiments with MarsEdit 2 and the Blogo 2. But both of those tools haven’t fulfil my requirements of having table of contents support latex type math support (latex is special for me because that is the most familiar) standard icons flowchart Tips and Notes which were not supported in my blog for years now. I was curious to have these new features in my blogger. Fortunately, I found a very good Markdown writers StackEdit and Typora . Workflow Here is my blog writing workflow: Created with Raphaël 2.1.2 Start document available ? publish ready ? StackEdit Save and Publish End Typora yes no yes no Typora This is so far the best desktop editor WYSIWYG editor found to create the document including Tabl...

Remote Debugging Tomcat 6 using SSH tunnel

Image
My current IDE is Intellij Idea 12 and it is running on Windows 7 machine. However, server exist on one of the RedHat Enterprise machines. The main challenge is to debug the remote tomcat server via SSH port 22 only because that is the only allowed path. Even I cannot ping the server. Instead of catalina.sh, I have to always run the "sudo service tomcatx start|stop" because tomcat is installed as a service using redhat yum. From this blog I found the details to setup the tomcat. I changed the TOMCAT_HOME/conf/tomcat6.conf file to have the following JAVA_OPTS JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address=15005,server=y,suspend=n" This is just a one line. As shown in the above, the port is address that is 15005. Now I have to create the SSH connection using Putty as shown in the below source port: 15005 Destination:  localhost:15005 After add as shown in the above screenshot, you have to start the session.  Now yo...