Category Archives: software

Form filler (Chrome extension)

As a programmer, I deal a lot with forms. Build the form, test the form, debug the form, test again, test test and test again.

It is still ok to fill up only 2 to 3 fields forms but it eats up your time if you have to fill up more than 10 fields everytime you want to test a form.

Further more if the form fields are all mandatory!

With the following tools you can just fill up the forms with dummy data or some pre-set data. It maybe useful for other purpose as well. Don’t know.

1. Form Filler

2. JunkFill

Atom text editor – my settings and packages used

Atom is a text editor by github.

Some important shortcut to use

  • command+P = to open new file in new tab
  • Cmd+F  = search in active file
  • Cmd+Shift+F = search in project
  • Cmd+Shift+W = close tab
  • Cmd+Shift+W = close window
  • Cmd+/ = to comment code line (just place cursor anywhere on the line)
  • Cmd+Shift+D = duplicate line
  • Cmd+, = open settings
  • Cmd+O = open folder as project
  • Cmd+R = go to function or symbol in active file

Full shortcut reference

Important things you should know

  • Open settings (Cmd+O)
    • go to install to install a new package
    • go to package – to disable, change settings for installed package

Some of settings for my Atom editor

UI

  • use default. seems it is very acceptable now.

Packages

  • linter
  • linter-php
  • autoclose-html – to automatically add close tag
  • project-quick-open – just enter ctrl-atl-P to open folder list in htdocs (must first set path in core settings)
  • docblockr (document tools) – easy for commenting (esp for function comment)
  • symbols-tree-view – to view functions, variables (or both) in a list. Can sort by alphabetical order
  • autocomplete-php – to get suggestions on php functions plus parameters to pass
  • goto-definition – able to go to function definition when press cmd+alt+enter
  • goto-declaration – to be able to use, need to create ctags by using

How to change default screenshot for Mac OS X from png to jpg

By default when you use the cmd+shift+4 to screenshot on Mac, it will produce image with .png format. I found that this format is larger in term of file size compared to .jpg.

To change .png format to .jpg, copy paste the following commands (one by one) in terminal

1. defaults write com.apple.screencapture type jpg

2. killall SystemUIServer

 

Sublime Text 3

This editor is fast and neat but requires plugins to be installed to fully utilize the power.

1. install the package control

cmd+shift+P
package control:install package

2. then install other plugins via the package control using the same step.

Some of the plugins.

  1. Sub­limeLin­ter
  2. Haven’t tried to install any other yet

Other sources on useful plugins:

http://wasil.org/sublime-text-3-perfect-php-development-set-up

http://neverstopbuilding.com/sublime-plugins-for-php

Different type of sleep mode on Mac

Go to terminal, type this command line

pmset -g | grep hibernatemode

The result will be either of the following

  • 0 = normal sleep for desktop (save in memory. use low power)
  • 1 = hibernate (save in hard disk. total off)
  • 3 = safe sleep (save in memory and hard disk. use low power)

To change, type this command line,

sudo pmset -a hibernatemode X

(X to replace with either 0, 1 or 3)