Meteor template default events

Whenever you create a new template you can use these boilerplate events and rename them to fit your needs.

Template.templateName.onDestroyed(function (){


Template.templateName.onRendered(function () {





VS Code Commenting Shortcuts

On MacOSX (as for September 11, 2017)

Key     Command

⌘K ⌘C   Add Line Comment    
⌘K ⌘U   Remove Line Comment 
⌘/      Toggle Line Comment 
⇧⌥A     Toggle Block Comment


On Linux (tested on Ubuntu)

Key     Command

Ctrl+/      Toggle Line Comment 
Ctrl+Shift+A     Toggle Block Comment




Generate your Terms of Use and Privacy Policy

If you are ever looking for a good way to create Terms of Use ad Privacy Policy statements then is a perfect site for this purpose. It is not in anyway suitable for large complex busineses but does do the jobs for most common small and medium businesses.

So head on over and generate your terms.



How properly setup your dual monitor task panels with Mint Cinnamon

Once you have added the panel to the second monitor window, right click on the newly added Panel and chose ‘Add applets to the panel’. Then add the Window list applet to the panel but clicking the ‘Add to panel’ button.

The list of applications opened on the second monitor should now appear.



Essential Articles on Remote PHP Debugging with PHPStorm and Xdebug



Enable remote xdebug in php.ini 

you will add a line in php.ini


Test your connection, if it doesn’t work with localhost, try you local network IP address as it depends to which network adapter PHPStorm is using for the debugging purposes.


Mac-Pro:~ mac$ telnet localhost 9000

Trying ::1…

telnet: connect to address ::1: Connection refused


Connected to localhost.

Escape character is ‘^]’.


telnet> exit

?Invalid command

telnet> quit

Connection closed.

Mac-Pro:~ mac$ telnet 9000


Connected to

Escape character is ‘^]’.

How to debug your application locally with iOS – iPad devices


Use Weblock – AdBlock for iOS app to create a redirect rule from http://app to the IP and port you like.

(Only works when on a WIFI network)


Install the App Weblock from the App Store. Then configure as per instruction in the app.

You must include the protocol and the domain and also a wildcard character at the end.

If you don’t include a wildcard character the images and other parts of your site will not load as there isn’t a redirect rule them.

Here’s what the redirect value should look like.



MariaDB Galera Quicktips


Set mysql server to auto start on all nodes.

Only when all the nodes are down run on main node.

sudo service mysql start --wsrep-new-cluster

Run the following on member nodes.

sudo service mysql start 

Join nodes to cluster by using command, with IP of one of the cluster nodes.

sudo service mysql start –wsrep_cluster_address=gcomm://ip_address

Check cluster size

mysql -u root -p -e ‘SELECT VARIABLE_VALUE as “cluster size” FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME=”wsrep_cluster_size”‘

Double check configuration files

sudo nano /etc/mysql/conf.d/galera.cnf
sudo nano /etc/mysql/conf.d/my.cnf


ERROR 1045 (28000): Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)

Processing triggers for ureadahead (0.100.0-16) …


System check

mysql root e“show status like ‘wsrep%'”

wsrep_local_state_comment    |Synced         <cluster issynced
wsrep_incoming_addresses     |  <node db1 isaprovider
wsrep_cluster_size           |1              <cluster consists of1node 
wsrep_ready                  |ON             <good:)

If you are importing an SQL file. Ensure that the database is imported as InnoDB.
Galera only support InnoDB replication.

Avoid and Remove Password Prompt For sudo – debian Ubuntu Avoid

Remove Password Prompt For sudo


If you disable the sudo password for your account, you will seriously compromise the security of your computer. Anyone sitting at your unattended, logged in account will have complete Root access, and remote exploits become much easier for malicious crackers.


  • This method is NOT suggested nor supported by the designers of Ubuntu.

  • Please do not suggest this to others unless you personally are available 24/7 to support the user if they have issues as a result of running a shell as Root.

These instructions are to remove the prompt for a password when using the sudo command. The sudo command will still need to be used for Root access though.

Edit the sudoers file

Open a Terminal window. Type in sudo visudo.Add the following line to the END of the file (if not at the end it can be nullified by later entries):

<username> ALL=NOPASSWD: ALL

Replace <username> with your user name (without the <>). This is assuming that Ubuntu has created a group with the same name as your user name, which is typical. You can alternately use the group users or any other such group you are in. Just make sure you are in that group. This can be checked by going to System->Administration->Users and Groups



Type in ^x to exit. This should prompt for an option to save the file, type in Y to save.

Log out, and then log back in. This should now allow you to run the sudo command without being prompted for a password.

Or to do this for the system wide group sudo

root$ echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

Log out, and then back in.