How to manage to do lists

You prepare a to do list to make sure you get things down. End up you have too many items in the list and none gets done.

So now you have to manage the to do list.

Instead of one to do list with lots of items on it. Make 3 lists.

1. List with important and urgent items to do. Must finish it TODAY

2. List with important but not urgent items. Must do but still can wait to finish it. You still have time to plan and do.

3. List with the rest of items. Where you mix all other items in this list. You can then remove any items because they are not important after some time, or you can move items to list number 2 or number 1

Mistakes by startups

  1. Not talking to real customers for features. Too many assumptions made or talk to wrong audiences
  2. Underprice the solutions. Good to start to enter the market, but must adjust quickly
  3. Slow in making sales, do follow ups and other sales and marketing activities. Focus too much on technical and worry too much customers can’t accept what they have
  4. Not focusing on cash flow and fund raising enough. For SaaS the revenue is very slow at start.

Unit apartment untuk dijual di Sri Palma Villa Mantin (owner)

Rumah untuk dijual Sri Palma Villa, Mantin, Negeri Sembilan (direct owner)

  • Blok 1, Tingkat 9
  • Bedroom: 3
  • Bathroom: 3
  • Built Up: ~1000 sqft
  • Price: RM110k cash/140 installment (nego/offer your price)
  • Maintenance: RM130/month
  • Telah habis bayaran loan bank

Kelebihan rumah

  • Dilengkapi table top
  • Rumah dijaga dengan baik
  • Sebab jual – tinggal di rumah lain dan sukar untuk maintain kerana tinggal jauh

Kelebihan Taman

  • Suasana yang tenang dan selamat
  • Kemudahan kolam renang, bbq pit, dewan di club house
  • Kawalan keselamatan 24 jam
  • Surau dalam taman. Boleh jalan kaki
  • Kemudahan kedai runcit, kedai makan di blok dan club house
  • Taman permainan dan court
  • Akses mudah berhampiran jalan besar
  • Berhampiran kolej

Akses

  • Bandar Mantin
  • Bandar Nilai
  • Akses highway LEKAS (Tol Pajam)
  • Akses highway PLUS (Tol Nilai)
  • KLCC
  • Seremban
  • KLIA

Berminat atau ada sebarang pertanyaan boleh hubungi

Azwan 012-2815182 (prefer whatsapp)

kolam renang
Security 24 jam
Play ground
Bilik 1 (attached bath room)
Bilik 2
Bilik 3 (attached bath room)
Ruang Tamu
Ruang makan
Dapur

Securing web application

Below are things to do to secure your web application

  1. Database user user for the system can only has access to insert, select, update, delete. Not other datase utilities like drop, create etc.
  2. Use recaptcha if wrong login attempt exceeds x times
  3. Never display id on url, use hashed id instead – checkout hashids.org
  4. Always check a user can’t view, access or update any data not belong to him/her. Especially on multi-tenant system
  5. Force at least 8 character length for user password. Better to include numbers, capital letters and special symbols
  6. If use cookies, make sure don’t save sensitive data and always save something that is encrypted that need to be decrypted by server in order to use. For example, for a remember me cookie, use user IP plus the username to construct the an encrypted “token” to be stored in cookie.
  7. Check again input at the back end even it has been check on front-end using javascript
  8. Make the 2-FA (2 factor authentication) available for user to choose
  9. Use SSL/HTTPS
  10. Always use production-standard settings. Not development-standard settings. For example, never display detail errors to the users such as sql error that show table and fields.
  11. Give developers/admins different username and access to what they can only do

Prevent form submitted twice

Sometimes there is issue we got double records in the database due to the form submitted twice.

Here is the way how to prevent it. A simple way

session_start();    
if (!$_SESSION['post_data'] == $_POST)
{
// process the data
// after success process, set the session to post value
    $_SESSION['post_data'] = $_POST;
}
else
{
// display a message that the form already submitted. 
}

Telegram bot to send message

This is a simple code for a telegram bot to send message to a person or to a group

function send_telegram($telegram_id, $message_text) {

        $secret_token='123456789:adfjalJNhahasdfHUsQ';

        // to get group telegram id (can be in negative value)
        // https://api.telegram.org/bot1228803793:AAEElKIr5OhBlnMpsvPVNLa_Gb4cjSriUsQ/getUpdates

        $url = "https://api.telegram.org/bot" . $secret_token . "/sendMessage?parse_mode=markdown&chat_id=" . $telegram_id;
        $url = $url . "&text=" . urlencode($message_text);
        $ch = curl_init();
        $optArray = array(
                CURLOPT_URL => $url,
                CURLOPT_RETURNTRANSFER => true
        );
        curl_setopt_array($ch, $optArray);
        $result = curl_exec($ch);
        curl_close($ch);
    }

Some important notes

  1. You need to create a bot using @botFather (search this bot in telegram and just follow the steps to create your own bot)
  2. Once your bot successfully created, you need to capture the secret token given
  3. To get the telegram id for user – can ask the user to send a message to @userinfobot – the telegram id is in integer
  4. To get telegram id for a group, you need to add the bot to the group and go to this link to get the group id, group id start with – (dash/negative sign)
    https://api.telegram.org/bot<your bot secret token>/getUpdates
  5. In order for bot able to send message to the group, you must add bot to the group
  6. In order for bot able to send message to a person, the person must send a message to the bot first

source

Productivity tips working from home

This post is more for my personal notes. Here are something you can do to stay productive even working at home.

1. Set a clear goal. For example to complete task A, B and C and stick to it. You don’t have to set so many goals to achieve. 3 important tasks per day is good enough.

2. Prepare a comfortable work station. Yes you can work anywhere but this place is where you’ll spend most of your time productively

3. Stay away from distraction as much as you could. Stay away from TV, from children (while you work), from your gadgets as well if it has nothing to do with your work.

4. Stick to your own productive time. Range of time where you can do your work most effectively. It can be 2 hours in the morning and 5 hours at night. During this time force yourself to finish as much work as possible.

5. Take a quick 10 minutes break every now and then. After a long working period. For example 5-10 minutes break to go to the toilet and have a drink after 40 minutes of working

6. Just do it! This is the mentality we need. Think small thing to achieve in a short time. Just start doing it right away. If you can continue working after finish the small task, it is a bonus. The key here is to START

7. Prioritize. Do what important and has most significance first.

8. Break one huge tasks to smaller ones. Then focus to finish the small tasks one at a time.

9. Share achievements with others. Good to share achievements (read progress) with your boss or if you don’t have one, with your partners or friends.

10. Be responsible! You are an adult. You know you are paid to do the work or you must complete the work. So do it because it is your responsible.

Send message to telegram via API

We can send message to a group or channel via API

What we need is token and chat_id. Bot and bot token to get from @botfather. While chat_id to get from telegram group/channel. i.e. @group_name

$token = "YOUR_BOT's_TOKEN";

$data = [
    'text' => 'your message here',
    'chat_id' => 'the_chat_id_here'
];

file_get_contents("https://api.telegram.org/bot$token/sendMessage?" . http_build_query($data) );

What to be on a sales page

A sales page is the most important page for you to have to help you sell online. The ultimate is to get people straight away purchase online.

Below are some tips to follow

  1. Credibility – to tell who you are and why people should listen to you and read further
  2. Build enthusiasm. What excite the users, and communicate what they want to hear. It’s not about your product, it’s all about them!
  3. Remove worries and anxieties. Money back guarantee, free trial, no credit card needed, can unsubscribe anytime etc. This will help remove barrier for people to purchase or take action
  4. Tell users WHY. People are more interested with the end result. Not the task. Forget about what they should do and how to do it. Tell they why they should do or should have.
  5. Use “people proof”. Tell success stories about real people, real business that are just like them. How skeptical there was previously, how they finally make it