Sunday, July 10, 2016

How to Speed Up My UNIFI internet speed?

If you're subscribed to Unifi and have recently been experiencing slower internet download speeds, here's what you need to do:

Confirm your internet speed is slow
1. Check here http://speedtest.tm.com.my/tmspeedtest.html
and
2. here http://www.speedtest.net/

Contact UNIFI (updated as at 9 July 2016)
1. Dial 100 on your phone
2. Give your mobile phone number that is assigned to your Unifi account
3. Ask the Unifi staff to please reset your account
4. Confirm the speed is restored by using the websites above.

Nice Food That I Would Recommend to Anyone

Fish & Chips - Epicuro
Nasi lemak - Village Park

Sunday, June 26, 2016

Meteor shortcuts

Meteor is a framework that speeds up web development.


Before we start:
Install Sublime (recommended editor)
Install Cmder (recommended command prompt)


Create new app

Cmder:
meteor create simple-todos
cd simple-todos meteor npm install meteor

Browser:
http://localhost:3000

File:
Open folder > simple-todos


Best Practices (my own)

  • Different modules for different sections of website e.g. head, body, footer
  • Each module has a file for its look (html) and a file for what it does (js) e.g. body.html, body.js
  • Load sequence: main.js --> [others].js --> [others].html



Create a template
<template>... </template>

Call a template
{{>templateName}}


Import all JS using the main JS file
Sublime: /client/main.js
import '../imports/ui/body.js';

Add logic or data
{{#each}} ...{{/each}} and {{#if}}...{{/if}}



DISPLAY COLLECTION OF DATA
JS file:
Template.body.helpers({
  mybunch: [
    { mysentence: 'This is task 1x' },
    { mysentence: 'This is task 2' },
    { mysentence: 'This is task 3' },
  ],
});
HTML file:
<ul>
      {{#each mybunch}}
        {{> mytemplate1}}
      {{/each}}
</ul>

<template name="mytemplate1">
  <li>{{mysentence}}</li>
</template>


FORM WITH RESPONSIVE BUTTONS
HTML file:
<template name="mytemplate2">
  <li class="{{#if checked}}checked{{/if}}">

    <button class="delete">&times;</button>

    <input type="checkbox" checked="{{checked}}" class="toggle-checked" />

    <span class="text">{{text}}</span>
  </li>
</template>
JS File: (use event listener "template.task.events" to listen for the event "click" located in css tag "toggle-checked"; when triggered, it UPDATE into the "Tasks" collection)
Template.task.events({
  'click .toggle-checked'() {
    // Set the checked property to the opposite of its current value
    Tasks.update(this._id, {
      $set: { checked: ! this.checked },
    });
  },
});

HTML file:
<template name="mytemplate2">
  <li class="{{#if checked}}checked{{/if}}">
    <button class="delete">&times;</button>

    <input type="checkbox" checked="{{checked}}" class="toggle-checked" />

    <span class="text">{{text}}</span>
  </li>
</template>

Template.task.events({
  'click .delete'() {
    Tasks.remove(this._id);
  },
});



CREATE A DATABASE
Sublime: /imports/tasks.js
import { Mongo } from 'meteor/mongo';
export const Tasks = new Mongo.Collection('tasks');
Server must import: /server/main.js
import '../imports/api/tasks.js';
Client must import: /imports/body.js
import { Tasks } from '../api/tasks.js';
Template.body.helpers({
  tasks() {
    return Tasks.find({});
  },
});



ADD ENTRY TO DATABASE MANUALLY

Cmder:
meteor mongo
db.tasks.insert({ text: "Hello world!", createdAt: new Date() });


ADD FORM
HTML File:
       <form class="new-task">
        <input type="text" name="text" placeholder="Type to add new tasks" />
      </form>
JS File: (use event listener "template.body.events" to listen for the event "submit" located in css tag "new-task"; when triggered, it INSERT into the "Tasks" collection)
Template.body.events({
  'submit .new-task'(event) {
    // Prevent default browser form submit
    event.preventDefault();
 
    // Get value from form element
    const target = event.target;
    const text = target.text.value;
 
    // Insert a task into the collection
    Tasks.insert({
      text,
      createdAt: new Date(), // current time
    });
 
    // Clear form
    target.text.value = '';
  },
});




SHOW NEWEST TASK AT THE TOP:
return Tasks.find({}, { sort: { createdAt: -1 } });  


Thursday, June 2, 2016

How to see Wifi Password on Windows 10

1. From the Start screen, swipe in from the right edge of the screen, and tap Settings.
2. Tap or click wireless network .
3. Tap and hold or right click on a wireless network name, and choose View connection properties.
4. Select Show characters to see the wireless network password.

Monday, May 2, 2016

Saturday, April 30, 2016

How to Pay MBPJ Summons Online with a Discount

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For an updated version, please click on this link
http://hacks-for-life.blogspot.my/2016/10/how-to-pay-mbpj-summons-with-discount.html
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Go to
Login at http://eps.mbpj.gov.my/LoginPengguna.aspx

Go to http://www.mbpj.gov.my/e-perkhidmatan
http://eps.mbpj.gov.my/index.aspx


Login to https://pgateway.mbpj.gov.my/bills/search

Hit Carian
Search for Kemudahan (Trafik dan Pelbagai)
Under No Kompaun, type in your compound number
Hit "Cari"
Tick the compounds which belong to you, then hit "Tambah di Senarai" to add it to tag it to your profile
Repeat if necessary to tag all other compounds to your profile

Hit Bayaran
Tick all the compounds you wish to pay, then hit "Bayar" button
Hit the Kad Kredit button (the only payment method available)

Make the payment (e.g. CIMB Clicks)

Go to Rekod Transaksi
Click on the relevant transaction to view details and print receipt


Popular Posts