php making of django like template system with extend

add this class Template :

class Template
{

    const DIRECTORY = '';

    protected $path;

    protected $extendedTemplate = null;

    protected $sections = array();
    protected $currentSection = null;

    public function extend( $name )
    {
        $this->extendedTemplate = new Template( "views/".$name );
    }

    public function begin( $sectionName )
    {

        ob_start(); // start output buffering
        $this->currentSection = $sectionName;

    }
    public function end()
    {

        if ( !is_null( $this->extendedTemplate ) )
        { // current one is a sub template

            // read buffer contents and drop them
            $this->sections[ $this->currentSection ] = ob_get_clean();

        }
        else
        { // current one is a master template

            if ( isset( $this->sections[ $this->currentSection ] ) )
            {

                ob_end_clean(); // drop default content
                echo $this->sections[ $this->currentSection ];

            }
            else
            {

                // output buffered data and drop buffer
                echo ob_get_clean();

            }

        }

    }

// will be called from "build" later
    public function setSections( $sections )
    {

        $this->sections = $sections;

    }
    public function __construct( $name )
    {

        $this->path = sprintf( '%s/%s', self::DIRECTORY, $name );

    }

    public function build()
    {

        // start output buffering
        ob_start();

        // just include the template file (some error checking would be nice)
        include $this->path;

        // Now our "extend", "begin" and "end" methods can be called from the template
        // using $this: $this->extend(), $this->begin() and so on...
        // We can't do anything here, just wait until the template is included
        // Note that we capture the HTML output with the output buffering.

        // get our buffered data
         $output = ob_get_clean();
        // Now we can check what we've got.
        if ( !is_null( $this->extendedTemplate ) )
        { // we have a sub template, go on with the master template

            // Since a master template is set, the "end" method has captured the contents
            // of the template sections. Now we have to provide the master template our
            // data.

            $this->extendedTemplate->setSections( $this->sections );

            // Now just display the master template.
            return $this->extendedTemplate->display();

        }
        else
        { // we have a master template, nothing more to do here

            return $output;
            // Since in a master template the "end" method outputs either the default
            // content or the extended data of a section our HTML output is complete.

        }

    }

    public function display()
    {

        echo $this->build();

    }

}

Call like this :

 $template = new Template( "views/$c_base/$method.phtml" );
            $template->display();

 

 

link:// thanks to guy..

http://blog.themeforest.net/tutorials/creating-an-html-friendly-template-system-using-phps-output-buffering/

Advertisements
Posted in PHP | 1 Comment

making own mvc framework in php

include these two classes will make

Request Class :

<?php

Class Request {

    private $_controller;
    private $_method;
    private $_args;

    public function __construct(){
        $str=$_SERVER['REQUEST_URI'];
       // echo "<pre>";
        //print_r($_SERVER);
        $first_slash = strpos($str, '/');
        $second_slash = strpos($str, '/', $first_slash+1);
        $str = substr($str, $second_slash+1);
        $parts = explode('/',$str);

        //print_r($parts);
        $this->_controller = ($c = array_shift($parts))? $c: 'index';
        $this->_method = ($c = array_shift($parts))? $c: 'index';
        $this->_args = (isset($parts[0])) ? $parts : array();
    }

    public function getController(){

        return $this->_controller;

    }
    public function getMethod(){

        return $this->_method;

    }
    public function getArgs(){

        return $this->_args;
    }
}

Router Class :

Class Router{

    public static function route(Request $request){

        $controller = $request->getController().'Controller';

        $method = $request->getMethod();

        $args = $request->getArgs();

        $controllerFile = dirname(__FILE__).'/controllers/'.$controller.'.php';
        if(is_readable($controllerFile)){
            require_once $controllerFile;

            $controller = new $controller;

            if(!empty($args)){
                call_user_func_array(array($controller,$method),$args);
            }else{
                call_user_func(array($controller,$method));
            }
            return;
        }

        throw new Exception('404 - '.$request->getController().'--Controller not found');
    }
}

Call them in index.php  like this :

$request=new Request();
        Router::route($request);

Creat controllers folder and first folder :

Class indexController {

    public function index() {
     // echo "index controoler callexd";
        include "views/auth/loginform.php";
    }

 

.htaccess in root :

RewriteEngine on

RewriteRule .*        index.php
Posted in PHP | 1 Comment

smoking 4

Junkie thinking..

Mine was that I would quit when things settled down.
Mine was always the stressful job (worked for attorneys)  having a smoke had less consequences than whacking the boss with a judge’s gavel.
“i smoke when i got bored”  Of course I was bored, smoking is a very boring thing to do! Bring object to mouth…puff…repeat ad nauseum!
we actually think we are doing something when smoking, so we rationalise we are not doing nothing, we are having a smoke.
” I enjoy” smoking.
Everyone needs one bad thing to do. I don’t want to be too pure.
I felt it was everyone else’s fault I smoked…. they stressed me out, or made me mad, or sad, or they were funny and I needed a laugh and a smoke….
Ye Gods…. it is so easy to blame anyone and everything for addiction…. when I accepted the pure fact that I was an addict and I was responsible for my own actions….
I turned the corner and am marching forward…..

Then: My parents told me not to – aka I had to be the rebel
Now: I wish I would have listened to them 30 years ago

Then: It tastes good
Now: it smells nasty

Then: Nothing like coffee & cigarette in the morning
Now: hold me baby, I’m randy!!  😉

Then: I would rather not go there (place I couldn’t smoke)
Now: free to go wherever I want & not feel like I want to leave early

Then: I’m stressed, I need a smoke
Now: I’m stressed, but an happy not to need a smoke

Then: thought it was a socially bonding
Now: realized smokers are in exile

Then: I’m not that addicted. I can smoke as much as I want.
Now: I am STILL an addict, but am SO HAPPY that I no longer NEED to smoke.

I figured no one cared, so why should I.

we’ll this is probably going to kill me(coughed nonstop!) but at least I’ll die happy!

What smoking does to me , i was having problem of vomiting since last 3 years and done lot of tests and medical checkups , waste lot of money , but not able to find why is this , this all was because of acidity developed due to smoking ,

And i was also having sore throats due to this acidity  i was not able to enjoy eating properly food because of acidity problem , mostly i east rice dal,

other problems like headache etc. solved , and looking forward for better health in future , don’t want to touch with addiction in future ,

what the hell addiction ..

Use the list of suggestions below to get yourself back on track:
– Write out a list of reasons for quitting.
– Educate yourself.
– Get support.
– Apply yourself just one simple day at a time.
– Accept yourself.

I made excuses not to go places or do things with nonsmoking friends and relatives. I was perfectly happy to be left alone so I could smoke all I wanted out on my patio.
I did not want to be around a bunch of uptight people who didn’t approve of smoking. I would rather smoke and be a social outcast.
so I became very good at being selfish and doing as I pleased.
By now I had a typical smoker’s cough in the morning and when I laughed or talked a lot.
I was getting scared about my health, but not that scared, and I still wanted to smoke.

My days are divided into two parts: smoking and waiting for my next smoke.

tell yourself you are strong and you will not smoke no matter what you will come through this bad time

I have tried to forget that I personally spent 20 years as a slave to nicotine. I have tried not to forget, however, the chains which bound me, and the hopelessness I experienced as an addict. I have tried not to forget the compulsion to suck poisons into my lungs, nor the knowledge that I was harming myself with every puff. I have tried not to forget the helpless horror one feels when you’re a prisoner of your own addiction. I have tried not to forget how horribly, terribly in denial you are even in the midst of the addiction. Am I masochistic in the remembrance? Nope. I simply feel that, by remembering my own weakness, I can treat with more respect those who are still ensnared. Those who come here every day need us to remember that vulnerability that has caused them to seek out the forums and to respect the frailty of their realization that they need support in quitting.

being addicted to cigarettes is like walking a dog that pulls you along.  pulls you outside to the smoking area, pulls you away from friends, pulls you away from family – demanding to go in a direction to feed the beast not necessarily in the direction you want to go.

You never win 🙂 So now I just switch off my retional brain and just keep doing what I’m doing, without counter-arguing the ‘just one puff’ urge. And it miraculously goes away 🙂

Weeks 1 to 6: 1 piece every 1 to 2 hours
Weeks 7 to 9: 1 piece every 2 to 4 hours
Weeks 10 to 12: 1 piece every 4 to 8 hours

The craves are coming…well, some are just little quick thouhts, but the tough ones are the ones that feel ONLY a cigarette will take them away.
But they go too, and the fine thing is that I often feel really relaxed after.

I still feel really positive and i remind myself how long it took even to get into this MINDSET.

Get it clear in your head that the cigarette is not relieving your nerves; it is slowly but steadily
destroying them. One of the great gains of breaking the habit is the return of your confidence and
self-assurance.

because the more you
go into the drug, the more it knocks you down and the less it restores you when you smoke.

CIGARETTES DO NOT FILL A VOID. THEY CREATE IT!

The sore is what makes us close our minds to all
these things. It’s that panic feeling of ‘I want a cigarette.’ Non-smokers don’t suffer from that
feeling. The worst thing we ever suffer from is fear, and the greatest gain you will receive is to be
rid of that fear.

Smoking is a chain reaction and a chain for life.
If you do not break that chain, you will remain a smoker for the rest of your life.

A FEAR OF LIVING

The trouble is, YOU DON’T KNOW
HOW LONG THE FUSE IS. Every time that you light a cigarette you are one step nearer to the
bomb exploding. HOW WILL YOU KNOW IF IT’S THE NEXT ONE?

It won’t happen unless you make it happen.

yet every smoker
has that choice every day of his life. Why doesn’t he opt for it? The answer is fear. The fear that he
cannot stop or that life won’t be the same without it.

1. There is nothing to give up. There are only marvelous positive gains to achieve.
2 Never see the odd cigarette. It doesn’t exist. There is only a lifetime of filth and disease,
3 There is nothing different about you. Any smoker can find it easy to stop.

Many smokers believe that they are confirmed smokers or have addictive personalities. I
promise you there is no such thing. No one needs to smoke before they become hooked on the
drug. It is the drug that hooks you and not the nature of your character or personality. That is the
effect of these drugs, they make you believe that you have an addictive personality. However, it is
essential that you remove this belief, because if you believe that yo u are dependent on nicotine,
you will be, even after the little nicotine monster inside your body is dead. It is essential to
remove all of the brainwashing.

Never forget:
*No smoker ever decided to become a smoker casual or otherwise,therefore:
* All smokers feel stupid, therefore:
* All smokers have to lie to themselves and other people in a vain
attempt to justify their stupidity.

.I am trying to stay more focussed on why NOT to smoke then focussing on why I need to smoke.

The real trap is the belief that now isn’t the right time – it will always be easier tomorrow.

Responsibility becomes stressful only when you don’t feel strong enough to handle it.
We confuse responsibility with stress.

Remember, he is not enjoying it;
it’s just that he cannot enjoy himself without it.

Understand your enemy. Know his tactics, and you will easily defeat him.

Up to then, whenever I failed, I had consoled myself with the thought that it would be easier
next time.

I then said to myself: ’Allen, WHETHER YOU LIKE IT OR NOT. YOU HAVE SMOKED
YOUR LAST CIGARETTE,’

The beautiful truth is: IT IS EASY TO STOP SMOKING. It is only the indecision
and moping about it that makes it difficult.

Therefore the key to making it easy is to make stopping certain and final. Not to hope but to know
you have kicked it, having made the decision. Never to doubt or question it. In fact, just the reverse –
always to rejoice about it.

1 Realize that you can achieve it. There is nothing different about you, and the only person who
can make you smoke that next cigarette is you.

2 There is absolutely nothing to give up. On the contrary, there are enormous positive gains to be
made, I do not only mean you will be healthier and richer. I mean you will enjoy the good times
more and be less miserable during the bad times.

3 Get it clear in your head that there is no such thing as one cigarette. Smoking is a drug addiction
and a chain re action. By moaning about the odd cigarette you will only be punishing yourself
needlessly.

4 See the whole business of smoking not as a sociable habit that might injure you. but as drug
addiction. Face up to the fact that, whether you like it or not, YOU HAVE GOT THE
DISEASE. It will not go away because you bury your head in the sand. Remember: like
all crippling diseases, it not only lasts for life but gets worse and worse. The easiest time to cure
it is now.

5 Separate the disease (i.e. the chemical addiction) from the frame of mind of being a smoker or a
non-smoker. All smokers, if given the opportunity to go back to the time before they became
hooked, would jump at that opportunity. You have that opportunity today! Don’t even think
about it as ‘giving up’ smoking. When you have made the final decision that you have smoked
your last cigarette you will already be a non-smoker. A smoker is one of those poor wretches
who have to go through life destroying themselves with cigarettes. A non-smoker is someone
who doesn’t. Once you have made that final decision, you have already achieved your object.
Rejoice in the fact. Do not it moping waiting for the chemical addiction to go. Get out and
enjoy life immediately. Life is marvelous even when you are addicted to nicotine, and each day it
will get better when you aren’t.

If you have a feeling of doom and gloom, it will be for one of the following reasons.
1 Something has not gelled in your mind. Re-read the above five points, and ask yourself if you
believe them to be true. If you doubt any point, re-read the appropriate sections in the book.
2 You fear failure itself. Do not worry. Just read on. You will succeed. The whole business of
smoking is like a confidence trick on a gigantic scale. Intelligent people fall for confidence
tricks, but it is only a fool who, having once found out about the trick, goes on kidding himself.
3 You agree with everything, but you are still miserable. Don’t be! Open your eyes. Something
marvelous is happening. You are about to escape from the prison.

The smoker has got into the habit of
relieving his withdrawal pangs at certain times or occasions, which causes an association of ideas
(e.g. ‘I cannot enjoy a drink without a cigarette’). It may be easier to understand the effect with the
help of an example.

You have a car for a few years, and let’s say the indicator lever is on the left of the steering column.
On your next car it is on the right (the law of sod). You know it is on the right, but for a couple of
weeks you put the windscreen wipers on whenever you want to indicate.

Stopping smoking is similar. During the early days of the withdrawal period the trigger mechanism
will operate at certain times. You will think, ‘I want a cigarette.’ It is essential to counter the
brainwashing right from square one, then these automatic triggers will quickly disappear. Under the
Willpower Method, because the smoker believes he is making a sacrifice, is moping about it and is
waiting for the urge to smoke to go, far from removing these trigger mechanisms he is actually
increasing them.

A common trigger is a meal, particularly one at a restaurant with friends. The ex-smoker is already
miserable because he is being deprived of his cigarette. His friends light up and he feels even more
deprived. Now he is not enjoying the meal or what should be a pleasant social occasion. Because of his
association of the cigarette with the meal and the social occasion he is now suffering a triple blow,
and the brainwashing is actually being increased.
***
If he is resolute and can hold out long enough, he eventually accepts his lot and gets on with his life.

However, part of the brainwashing remains, and I
think the second most pathetic thing about smoking is the smoker who has given up for health or
money reasons, yet even after several years still craves a cigarette on certain occasions. He is pining
for an illusion that exists only in his mind and is needlessly torturing himself.

There is no need to be miserable. Cigarettes do not make meals or social occasions;
they ruin them.

Do not worry about withdrawal. The feeling itself isn’t bad. It is the association
with wanting a cigarette and then feeling denied that is the problem.

Instead of moping about it, say to yourself, ‘I know what it is. It’s the withdrawal pang from nicotine.
That’s what smokers suffer all their lives and that’s what keeps them smoking. Non-smokers do not
suffer these pangs. It is another of the many evils of this drug. Isn’t it marvelous I am purging this
evil from my body!’

You will be ridding yourself of an awful disease. That bonus will more than outweigh the slight trauma, and you
will actually enjoy the withdrawal pangs. They will become moments of pleasure.

Be prepared for these traps in advance. Whatever the temptation, get it into your mind
that it is: only there because of the monster inside your body, and every time you resist the temptation
you have dealt another mortal blow in the battle.

Posted in smoking | Leave a comment

2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 13,000 views in 2012. If each view were a film, this blog would power 3 Film Festivals

Click here to see the complete report.

Posted in Uncategorized | Leave a comment

smoking 3

But for me the greatest joy of being free was not the health, the money, the
energy, or the ending of the slavery, it was the removal of those sinister black shadows, the removal of feeling despised(tiriskrat) by and feeling apologetic(sharminda) to non-smokers, and most of all to be able to respect yourself.

I loathed(grana) myself for being dependent on an evil weed that I knew was ruining my life. I cannot tell you of the utter joy of being free of those sinister black shadows, the dependency and the self-despising.

It is an accepted fact in our society that it is very difficult to stop smoking. Even books advising you how to do so usually start off by telling you how difficult it is. The truth is that it is ridiculously easy. Yes, I can understand your questioning that statement, but just consider it.

The probable result after a period of torture is the compromise I’ll cut down’ or
‘I’ve picked the wrong time’ or I’ll wait until the stress has gone from my life.’

 

 

Posted in smoking | Leave a comment

smoking 2

list of reason:

health
don’t want to have big disease , i don’t want to die with oxygen mask and other ,,don’t want to get health issues every month due to smoking ,i want to have life at old age also ,,for good breathing ,

freedom
I hated the smell, the embarrassment, and the need. I especially resented the need. Nicotine dependency made me feel weak and helpless. don’t want to have poor self esteem, and self respect , don’t want to have wrong beilief system  that smoking is good as described in notes,it may help you overcoming other addictions in my life … will get pride ,

money:
don’t want to waste time ,money and energy , don’t want to settle for less ,and don’t want to let go things ., (in health also),don’t want to let go relationships ,

———————————————————————————————————————————————————————————————-

When something stressful happened, what did I do? I lit a cigarette so I could think it over, of course. By the end of the cigarette, I often decided to let go of whatever it was, which sometimes was not a good choice. Smoking taught me to avoid, and avoidance breeds tension. I was teaching myself to settle for less by not dealing with life head on.

Smoking taught me that I was weak. I felt powerless to quit. As much as I hated smoking, I thought I couldn’t live without my cigarettes. And there was that nagging worry in the back of my mind that I was killing myself, one cigarette at a time. I was in a constant state of subtle turmoil. It was such an awful way to live, but I settled for it for a long time. Nicotine addiction does that to a person.

Don’t settle for less in your life.
Smoking is a way of settling for so much less than you deserve. It’s self-destructive behavior that tends to trickle to other areas of your life. Once you quit smoking, positive changes start to happen.

When I smoked, it didn’t seem to make much difference whether I was exercising and eating a healthy diet or not. I knew I was poisoning myself 20 times a day. Now, making the most of what I have by living healthfully has become a positive focus in my life. I won’t settle for less.

Relationships have shifted somewhat as well…some have been let go and others I nurture more. As a smoker, I tolerated more than was good for me at times, but not anymore. Life is too short, and I just won’t settle for less.

It’s proof of a new way of living…of not settling for less.

One day at a time…it works. Persistence and patience and time — they’re your path to a smoke free future and a better way of life.
Don’t settle for anything less.

I made up my mind to settle in and apply myself to the task of breaking the links in the chains that bound me, one at a time, however long that might take.

I fed my quit program with daily doses of education and support, making a point to end every day on a note of gratitude.

That part was easy – all I had to do was think about the fact that I hadn’t smoked that day, and I was enormously thankful. Incorporating these things into life until they became a natural part of my routine were stepping stones to the right mindset and one that would permanently take me away from smoking.

I am thankful for the life I live now, free of nicotine. I am grateful for my good health and increased energy. I do not take cessation for granted. It is truly the best gift I have ever, ever given myself.

Just thinking about quitting is enough to make most smokers edgy.

Does smoking cessation just magically happen when a person is ‘ready’?

If you rely on being ‘ready’ before you quit smoking, you run the risk of never quitting.

It’s possible — in fact, it is likely that you won’t be ‘ready’ to quit when the time comes. You’ll probably feel some mixture of sadness, loss, anger and fear as you embark on your quit program.

Embrace the process and don’t look back! You have nothing to lose and everything to gain.

Do you know what to expect as your body moves through physical withdrawal from nicotine?

Do you have any idea how to quiet the thoughts of smoking that bombard our minds (seemingly nonstop) during the first several weeks of the recovery process?

The more you learn about what you might experience when you quit smoking, the more easily you’ll be able to navigate the ups and downs. Early smoking cessation is intense to be sure, but with a little preparation, you can maintain control and move past this phase of recovery from nicotine addiction.

Take a few moments to concentrate on your breathing, and you’ll be able to weather the craving successfully.

Close your eyes if possible and breathe in through your nose for a count of three, and exhale through your mouth for a count of three. Repeat this for a few minutes, and the tension in your body will begin to fall away.

***Cravings to Smoke are Not Commands

How you choose to react to a craving can either increase or decrease its power over you.

try a little reverse psychology.

Instead of tensing up for a struggle, relax and mentally lean into the craving. Let it wash over you, and accept it as a sign of healing because that is just what it is. The urge will run its course and pass. Practice makes perfect with this technique. You’ll get the hang of it with time and will find it empowering.

Your body is working hard to expel toxins, which takes energy. Choose foods that will provide you with the high quality fuel you need.

Stock the fridge with healthy, ready-to-eat snacks.

Grape or cherry tomatoes
baby carrots or celery sticks with low-fat ranch dressing or hommus
melon chunks
fresh berries in season
string cheese
low-fat yogurt
low-fat pudding cups
fudgsicles
frozen grapes

exercise is a solid way to maintain control over the mood swings and urges to smoke that are common during this time.

Exercise has the added benefit of releasing endorphins, the feel-good hormone. This is a huge benefit for someone who is working to quit smoking because endorphins improve the state of our emotions.

Quitting tobacco is hard work, and every single day you complete smoke-free early on is a victory, plain and simple. Honor the effort you’re putting into saving your life by rewarding yourself at the end of every day in small ways that refresh and relax you.

Come up with a list of small gifts to treat yourself daily.

Ideas include:

Take a hot bath.
Buy a new candle.
Find a quiet corner and read a good book.
Take a power nap.
Enlist someone else in the family to cook dinner.
Have a cup of tea.
Listen to a relaxation tape or soothing music.
Head for the gym.
Do some gardening.

Think of your daily reward as an investment in your smoke-free future.

Better days are ahead.

The freedom gained when we break free of the chains of nicotine addiction far outweighs the discomforts of nicotine withdrawal.

you’ll notice that most cravings to smoke last only three to five minutes. They tend to come off the blocks strong, and decrease gradually until they’re gone.

Physical cravings are your body’s reaction to nicotine withdrawal. You may feel a tightness in your throat or belly, accompanied by feelings of tension or mild anxiety.

The most effective way to do that is to interrupt your thought pattern on the spot. Shift gears and do something different for a few minutes.

Change your activity, either mentally or physically, and the craving will lose its power and be gone before you know it.

Your body is working hard right now to overcome the effects of nicotine withdrawal, and some extra sleep will do you good.

As smokers, we were accustomed to receiving doses of nicotine and approximately 4,000 other chemicals 20 to 40 times a day. The stress of abruptly cutting off that supply, as unhealthy as it was, can leave us feeling extraordinarily fatigued.

Friends and family can be helpful, but they may not understand the depth of what quitting smoking means to you, especially if they’ve never smoked. You may be left feeling as though you’re not getting acknowledged for the hard work you’re putting into cessation.

Dear______,

I am about to try and change my life for the better. I am going to quit smoking. I just wanted to write this letter to you so you know what to expect for the next couple of weeks, since the process of withdrawal can be very challenging for me, and for those around me. (Most people do not realize it, but nicotine addiction is literally one of the hardest drugs to kick, even harder than heroin).

Everyone reacts to the withdrawal symptoms differently, but in general, during the first two weeks (Hell Week and Heck Week), don’t expect much from me. I will most likely not be my normal self. All of my attention will literally be taken up with fighting the physical and mental urges to smoke. I may cry, I may yell, I may ignore you. Worst of all, I may say very hurtful things to you, but I want you to know that this is the nicotine talking, not my heart. I WILL apologize afterwards, once the poison has left my body and my mind has cleared, but for the moment, please, PLEASE remember that I love you, and let it roll off your back.

You need to know that when a smoker quits, the body and the mind will try almost anything to trick the user into taking another puff. I may rationalize that “now is not a good time”. I may question the worth of my existence. I may talk about feeling a sense of emptiness and loss. My body may develop aches and pains. I may not be able to sleep. I may act like the pain I am experiencing is all your fault.

But be aware that I am doing this for ME, not for you. In this one important way, I have to be selfish, so that I cannot give the nicotine a reason to put the blame on anyone else. So you must not feel responsible for my discomfort and depression. Even if you feel you can’t stand to see me this way, whatever you do, do NOT tell me it’s OK to smoke, just to stop the pain. You have to be strong when I am weak, so do not agree with any “junkie thinking” I may come up with.

Here are 10 things you CAN do to help:

Be there when I need a hug, but don’t be hurt when I push you away.
If I tell you to leave me alone, give me space, but don’t go too far…I need to know you are near no matter what the nicotine says.
Don’t try to argue with me when I start to rationalize…silence is a more powerful message.
Avoid the topic of cigarettes (because I’m trying to get them off my mind), unless I bring it up first.
Do the best you can to act as if everything is normal. The more “normal” you act, the faster I will get there.
Consciously avoid putting me into situations where I will be in the presence of smokers. This may mean avoiding favorite restaurants or bars, or hanging out with certain friends for awhile.
Consciously avoid letting me get into stressful situations…if something stressful can be put off for a couple of weeks, please try to do so. If not, please try to cushion me.
Help me avoid “trigger” situations…places or activities where I usually light up. (For example, don’t plan long road trips for the next couple of weeks if I usually smoke in the car).
Just keep telling me it will get better, that the emptiness and pain will fade, that you love me, and that this effort is worth it.
Tell me I am strong. Tell me you are proud of me. But also, tell me you will be there no matter what I say or do.

I just wanted to prepare you because the first two weeks are usually the worst, but be aware that it doesn’t suddenly get better…it will be a gradual process. Also, please be aware that while I am doing this quit for me, you and those around me will benefit as well. I will be free from the shackles of needing to know where the closest cigarette store is. I will be free of the smell and stains. I will be free of an early death. And I will be free to spend more quality time with those I love.

Thank you in advance for being strong enough to love me, and help me through this.

Love, _______

Teeth:

Discoloration and stains
Plaque
Loose teeth
Gum disease (gingivitis)

impotence
Altered brain chemistry
Anxiety about harm caused by smoking

Weakened immune system
Colds and flu

Research has shown that people who quit before age 35 reduce their risk of developing a tobacco-related disease by 90 percent(1). Even smokers who quit before age 50 significantly reduce their risk of dying from a tobacco-related disease(1).

Smoking cessation takes time. Expect that you will have ups and downs as you work through recovery, and learn the art of patience, mostly with self.
One day at a time we release this addiction that has held us tight for years.

We wait in lines at the store, the post office, the DMV. We wait for Dr.’s appointments, for holiday sales and for cars with custom options. We make time for and wait for all of these things because we have to in order to get the things we want and need. You are all worth the wait, however long it is. The payoff for your patience in this process is bigger and better than I can really describe in words. The irritability, frustration, and other discomforts are temporary; please take each day as it comes, and find some peace in knowing that you are healing…every day.

The release from this addiction comes bit by bit, so try to relax and put some time between you and that last cigarette you smoked. The freedom you’ll gain is worth every bit of work you put into your quit!

The truth is this…there is no substitute for time.

Education is key and essential for long-term success.

It’s exhausting at times, and there are mood swings and minds games, and it is all part of the process of becoming someone who is not a slave to cigarettes.

It can be tiring, but not as tiring as chemotherapy and radiation treatments.

It is about perspective, and as you progress through this process, your perspective will change. Mine has…for the better and forever.

I believe some things are still worth waiting for, and I KNOW that smoke-freedom is one of them.

So…rant, whine, scream…whatever it takes to get you from where you are to where you want to be, but PLEASE DON’T SMOKE! I promise that quitting smoking will not kill you, and if you let it, it can even be one of the most amazing experiences of your life.

What starts out as a struggle minute-by-minute will gradually become more comfortable for you as you get some practice under your belt.

Momentum is a great tool – build up that initial head of steam, and momentum will help propel you through the process.

People often come through cessation strengthened in ways they never expected. Believe in the the principles of recovery from this addiction, and believe in yourself.

You have what it takes to succeed within you right now. Take the time to learn how to quit smoking and tap into the potential to make smoking a thing of the past – your past.

When we quit smoking, it is only natural to expect friends and loved ones to share in the excitement of what we are working to accomplish. We want them to understand just how important and how difficult the challenge of leaving nicotine behind is for us. We expect them to understand. However, that is not always the way it works out.

While friends and family members are usually quick to encourage us to quit and are happy and proud of us when we do, their support often wanes in a short amount of time. They pat us on the back every day for a week or two, but after that, it’s all but forgotten. We quit, right? Time to move on, then. They’re not callous or uncaring, they just don’t get it.

Those who have never known the intense pull of nicotine addiction don’t understand that every single smoke-free day is a huge victory when we quit and that this goes on well beyond the first week, month, or even series of months.

Those Who Undermine Our Quit Programs

A lack of enthusiasm from nonsmoking friends and family members can be disappointing, but the negative attention our smoking friends sometimes give us can be downright destructive and hurtful.

Keep this in mind when someone offers you a cigarette or a drag off of theirs, saying they won’t tell if you cheat. Or when they say things like you’re no fun anymore or you’re bound to relapse eventually, don’t be hurt. The reasons they cannot be supportive are always about their own issues, not yours.

Whether we’re trying to lose a few extra pounds, get our finances in order or quit smoking, success depends on our commitment to the task.

It is only when the change we’re after is solidly rooted in our own inner desire that we are in a position to succeed for the long term.

Quit smoking for yourself only, and the rest will fall into place. Don’t let anyone shake your confidence as you move through the recovery process. You are on the right path, make no mistake!

Smoking Cessation is an active community of people that sparkles with can-do encouragement and camaraderie.

Own it!

******
Remember: If you find yourself up against lack luster encouragement from loved ones or worse, active undermining of your quit program by another smoker, put your blinders on and pay no attention.
You know that they just wish they could quit themselves or
can’t quite connect with the life-changing challenge that smoking cessation is for you.

Move forward with determination and confidence and keep at it. Your efforts will be rewarded with smoke-free benefits far beyond what you can imagine!

Education takes you out of the role of being a helpless victim of addiction and puts you in the driver’s seat with your quit program.

Don’t let nicotine withdrawal scare you!
Remember – nicotine withdrawal is a temporary phase of recovery. It doesn’t last long and better days….much better days lie ahead. The fantastic feeling of freedom and control you’ll get when you successfully beat this addiction is worth every bit of effort you give to quitting, and then some.

You are worth it.

we often make the horrible mistake of looking at cigarettes as we would a lover of the past. We see cigarettes as the guy or woman that things didn’t work out with. What we should have been doing is looking at them for the horror story they truly are…. the ex that tried to put a bullet through our lungs,(copd & emphysema) stick a screwdriver through our neck ( tracheotomy) and cut our limbs off with a chainsaw.

We need to see cigarettes for what they really are – the potential death of us.

I don’t look at them and long for them like I miss an ex-boyfriend who things didn’t work out with. No, instead I despise them, like I did the man who nearly drove me insane, who tried to cause me to have a nervous breakdown, who married me for every wrong reason that exists. ( I’ve healed from some of that with that ex – but I have no desire to be with him anymore).

I think so many of us would be helped if we stopped “missing” the cigarettes, and stop longing for them like we would long for a lover to come back to us reformed and with open arms.

The relationship between cigarettes and us is dead and over. Truthfully, it should have never been a relationship in the first place.

((( Peace and Love)))

The Power of Now
What we do today has great influence over our tomorrows – an important thing to remember in this process. Keep your eye on the prize and keep yourself firmly planted in the day you have in front of you.

Remind yourself daily about why you want to quit smoking, and picture yourself as a contented nonsmoker, free of the need to light up every hour on the hour.

It’s not far fetched – it’s doable, and you have the ability to make it happen, right now. Believe it and believe in yourself. The rewards far outweigh the work it takes to achieve your freedom, I promise you!

Quitting is very possible though, and thousands do it successfully every year.

Empower yourself with knowledge.
You’ll be rewarded with increased motivation and will.
Make it happen!

Believe in the process of quitting tobacco, and believe in yourself. Remember, you can do this just as well as the next person. Those who have quit successfully don’t have any secret power that you don’t possess.

Some people prefer to be busy when they first quit to keep them distracted and moving through the withdrawal phase. Some prefer to sleep it away. It’s a matter of personal preference, really, but be prepared to do whatever you need to do to make yourself more comfortable.

If that means taking a sick day and staying in bed, so be it. The symptoms of early withdrawal are intense, but short-lived.

Lay the foundation for a solid, well thought out cessation program. Don’t let the process of recovering from nicotine addiction scare you! Quitting can be done, and you’ll love the person you become without the chains of addiction weighing you down.

Don’t slip into thinking that because you’ve done so well, you can smoke and quit again easily.It never works that way. People who return to smoking often spend years trying to quit again.

It never works that way.
Keep your memory green.

Your reasons for quitting will never be less true as time goes by, but they can feel less critical if you’re not careful.

Why did I quit smoking?

How long did I smoke?

How long have I been smoke free?

How long do I think it should take to be free of this habit?

If I go back to smoking, will I want to quit again?

How long will it be before I do? Weeks…months…years? When illness strikes?

Will quitting be any easier next time around?

How do I think smoking will benefit me?

Is it worth giving up what I’ve worked so hard to do?

Don’t Be Impatient

We all want this quit to be the quit — the one that lasts us a lifetime.

Misconceptions about the nature of nicotine addiction and the process of quitting tobacco can set smokers who are trying to quit up for failure. Build a strong quit program by educating yourself about what to expect when you stop smoking

It is a natural tendency to quit smoking and expect to be over it within a month. That would be nice (very nice!), but it doesn’t work that way.

Smoking cessation is a process, not an event.

When we quit smoking, we’re letting go of a habit that most of us have carried for many years, if not all of our adult lives. It’s only fair to expect that breaking down the old associations that tied us to smoking and replacing them with new, healthier habits will take some time.

Sit back, relax, and think of time as one of your best quit buddies. The more of it you put between you and that last cigarette you smoked, the stronger you’ll become. Have patience with yourself, and with the process.

Don’t Worry About the Future

Nicotine withdrawal plays mind games with us early on in smoking cessation. We think about smoking all of the time, and we worry that we’ll always miss our cigarettes. It’s called “junkie thinking,” and we all go through a certain amount of it as we recover from nicotine addiction.

For the new quitter, it can be paralyzing to think about never lighting another cigarette. Thoughts like this, if left unchecked, can easily lead to a smoking relapse.

We all spend so much time living in the past or the future, while the present moments of today go by unnoticed. The next time your mind wanders ahead or back, consciously pull yourself out of it by narrowing your attention to the moments you’re living right now.

Think for a moment of your life as a tightly woven piece of fabric. Each thread represents your life events and experiences. And running alongside all of the many “life” threads are threads of a finer gauge.

Those threads are your smoking habit, and they’ve become so thoroughly interwoven in the fabric of your life, you find you can’t do anything without thinking about how smoking will fit into it.

The associations that we build up over time between the activities in our lives and smoking are closely knit. Once you quit smoking, your job becomes one of unraveling those smoking threads, or associations, one by one. How does that happen? And how long does it take?

You built your smoking habit through years of practice. Now, build the nonsmoking you the same way. Practice is a necessary part of recovery from nicotine addiction, so try to relax and let time help you.

The more of it you put between yourself and that last cigarette you smoked, the stronger you’ll become.

“I feel so irritable without my smokes. I’m impatient and angry without cigarettes.”

Reinforce this way:

“Cigarettes did this to me. Once I’m free of this addiction, I’m never going back to the slavery that nicotine forced me in to again.”

“At 10 minutes smoking time per cigarette, I used to waste nearly 3 hours every single day smoking! It’s no wonder I feel a little fidgety and empty. I’ll take up a hobby and do something productive with the time I used to spend smoking.”

Don’t look at quitting tobacco as a sacrifice. You’re not giving up anything of value. Your quit program is a gift. Change your attitude and you’ll find your freedom.

Cessation is doable, and your precious life is worth the work it takes to achieve.

Don’t Be Negative

It’s been said that the average person has approximately 66,000 thoughts on any given day, and that two-thirds of them are negative. It will probably come as no surprise that we aim many of those negative thoughts directly at ourselves. Face it, we’re almost always our own worst critics.

Don’t Neglect Yourself

Taking care of your body, especially as you move through early cessation, will help you minimize the discomforts of nicotine withdrawal.
Don’t Drink Alcohol

Don’t Overdo It
We’ve talked about taking care not to neglect our physical health while going through nicotine withdrawal, but our emotional well-being is every bit as important. Stress and anger are probably the two biggest smoking triggers we face, and they can build up and threaten our quit programs if we’re not careful.

Early cessation creates its own tension, and that can be overwhelming when paired with the stresses of daily life — if you let it.

Don’t let yourself get run down to the point of exhaustion, and take time every single day to relieve stress with an activity that you enjoy. Whether it’s time alone with a good book, a hot bath, or working on a hobby, think of this as insurance for your quit program, not as time spent selfishly. When you’re well-rested and calm, you are much better equipped to meet the daily challenges smoking cessation presents, so spoil yourself a little each day.

Don’t Take Yourself Too Seriously

You will have bad days. Expect and accept that. Such is smoking cessation, and such is life. On those off days, vow to put yourself in “ignore mode.” In other words, don’t focus on the negative atmosphere of your thoughts.

Sometimes the best thing we can do is get out of our own way. Our minds can make small issues big and create drama out of every little thing when our moods are out of whack.

When you have a bad day, use it as an excuse to pamper yourself a little. If all else fails, call it a day earlier than usual and go to bed. Nine times out of ten you’ll wake up feeling 100% better the next day, and when you do, you’ll be grateful to still be smoke-free.

Don’t Hesitate to Ask for Help

Don’t Think You Can Smoke “Just One” Cigarette

Don’t Forget Why You Wanted to Quit

You quit smoking for a reason. Probably several. Don’t let time and distance from the habit cloud your thinking

Smoking cessation is a journey. Take it one simple day at a time, and you’ll find that what started out as a difficult task soon enough becomes an enjoyable challenge.

————————————————————————————————————————————————————————-

Over the years, we teach ourselves that smoking is something we like, need, and function more efficiently with.The reality is that we are addicted to a drug called nicotine, and that addiction has a neverending need to be fed.

Do not fear, it is baggage too burdensome to bring along with you on this journey. I wrote that recently to another newcomer. Do not fear quitting; if you must fear something, fear the consequence of maintaining your smoking addiction.

let your heart, not your head, lead the way in your quit.

The secret is that below the turmoil of our minds, at all times, there is a peaceful place where we can take refuge through any storm. You can find this place at any time, and the more often you take advantage of this safe harbor, the easier you may have recourse to it in the future, regardless of what may be transpiring within or without.

I think that is about as clear as I can be on this topic of surrender.

I felt depressed and caved, and the moments when I felt depressed but stuck to my guns. Every moment taught me something, and every moment led to the sum of all the efforts made to get myself free.

The fog of illusion dissipates and the sun rises and any tears cried along the way disappear. Your mind realizes where it once was and your heart is grateful because now you can truly laugh. You were once stuck, and now you are free. There will be no regrets that you chose the road to freedom!

HANNAH

we learn to crave a cigarette when difficult emotions come, even if the nicotine level in our bloodstream is topped off.

I always tell folks that smoking cessation is a lot like constructing a new home. Year one is all about building the foundation. It is important take your time to do it right so that it will support your house without cracking.

Year two is about letting that foundation settle and dry…and building the new home on top of it.

Year three is about moving in and going on with your new life, relaxed and secure in your new home.

One of the biggest obstacles we all face is that voice that tells us we can’t do it.If you listen for too long that voice can seem reasonable, so do all you can to tune it out.

Give yourself the mantra ” I CAN AND WILL DO IT! “Add anything positive to your mind that you can think of like
” I am strong, healthy ,smart, funny, hard working etc. ”

smoking is not an option .. if you are lonely ..

I loathed myself for being dependent on an
evil weed that I knew was ruining my life. I cannot tell you of the utter joy of being free of those
sinister black shadows, the dependency and the self-despising.

Posted in Uncategorized | Leave a comment

Mental Clarity Or Focus

 
To strengthen yourself you need to have mental clarity or focus. That is possible if there is not so much of excessive thought, so as to generate clouds of unhappiness, suffering, grief, indecision, doubts and negativity – thoughts that your mind produces, thoughts that are weak, useless or wasteful. All of these thoughts cloud your own clarity. Mental focus means to think less, think concretely, concentrate, think in an elevated way, and your thought will have an energy of clarity and inner strength that will help you to put it into practice with greater success.You should strengthen yourself to achieve a state of self-control. For this, you need to study yourself, know yourself and understand yourself. You need inner silence, for there not to be so much mental chatter (noise) from thinking, thinking, thinking and thinking.On top of that, other people influence you and so you generate even more thoughts. There are so many influences and inner voices that speak to you. With all of that there cannot be clarity. There is the voice of your fears, of your ego, that of desires and greed, there are influences of the past, thoughts emerging from your values, influences of your neighbors, your children, your husband or wife, your mother or father, the influence of your office colleague’s opinion, or your best friend, your doctor, your guru, etc. You can listen to many inner and outer voices and, if you are not strong, your mind weakens under so many influences, which has negative effects on your clarity of mind. Because of all of this you have to strengthen your mind, which means, think less; think slower, concentrated and clear thought; with sense and meaning; of quality, based on a healthy and positive motivation. These thoughts are then like arrows, which have positive strength and clarity.

Posted in Meditation | Leave a comment

smoking

medicines which helps in quit smoking ..

zyban,

chantix,

 

Nicotine is Highly Addictive

Smoking really is a terrible habit.

Smoking cessation is a process, not an event.

I have been drinking a lot of water, sucking on lollipops and doing the deep breathing exercises.  They all have helped.

This quitting business is exhausting and takes a lot of strength ,so it’s no wonder we all feel tired to some degree…..but it is worth it

Remember, release from nicotine addiction comes gradually, as you erase old associations and habits one by one, replacing them with new,
healthier choices.

Don’t Take Yourself Too Seriously
You will have bad days. Expect and accept that. Such is smoking cessation, and such is life. On those off days, resolve to put yourself on ignore. Sometimes the best thing we can do is to get out of our own way. Our minds can make small issues huge, and make a drama out of every little thing when our moods are out of whack.

The truth of the matter is…
…smokers like the feeling they get when the nicotine level in their bloodstream is replenished(fir se bharna). From the time a cigarette is stubbed out until the next one is lit, smokers are in a state of physical withdrawal from nicotine. The more time between cigarettes, the more severe the withdrawal, resulting in edginess, inability to concentrate, and even feelings of depression. It’s a vicious, neverending cycle.

Junkie (nashebaaz, latayi) thinking

Your mind can feel like it’s turning itself inside out trying to convince you to have just one cigarette.
Don’t let it throw you;this is a normal part of recovery from nicotine addiction.
Make a vow to put your thoughts on ignore when you’re struggling, and keep your focus on the day you have in front of you only.
Don’t worry about tomorrow; don’t fret about never smoking again. Just think about getting through TODAY smoke free.

Junkie thinking can sometimes spring up out of nowhere when you least expect it, and suddenly your mind is trying to rationalize why smoking would be an alright thing to do. That is addiction and habit talking to you, and the voices can get pretty urgent at times, demanding your attention.

Protect and nurture the freedom you’re gaining from this deadly habit.

Alternate Spellings: junky thinking
Examples:

I can smoke just one cigarette.
Why do others get to smoke and I can’t?
I’m so stressed–if I smoke, it will help calm me down.
I can quit again tomorrow.

houghts of smoking can creep in and throw you off balance if you’re not prepared for them.

‘A good way to think of thoughts of smoking is that “El Nico” is dying. Smoking urges are him struggling to get you to feed him. The longer he goes without being fed, the dimmer his voice will get. He will eventually starve to death. As he gets weaker, the strength he is losing is being transferred to you. You are gaining strength each time you are successful at not smoking. If you were to light up, El Nico would smile his evil smile and say, “I tricked her into feeding me, so now I’m gonna be in charge again!” Don’t let this happen.’

“An educated quit is a successful quit.”

When we quit, we quickly start to feel the stress of emotional loss, which is triggered by the many associations we’ve built up around smoking over the years.  We smoked when we were happy, angry, sad, bored, lonely… you name it.

Quitting tobacco is a process. It doesn’t happen overnight, but compared to the amount of time most of us spent smoking, recovery from nicotine addiction is relatively short.

Years of smoking taught us to react to literally everything by lighting a cigarette. When we were happy, we’d celebrate by lighting up. When we got angry, smoking would calm us down, or so we thought. Tired? Smoke a cigarette to stay awake. Hungry? Feed yourself a smoke. This list goes on and on.

Practice Makes Perfect
Recovery from nicotine addiction is a process of gradual release over time.

Successful recovery includes learning how to hear the message behind the urge to smoke and respond with more appropriate choices, such as a nap or a meal, for instance.

Have patience with yourself. This skill takes some time to hone, but you’ll get better at it.

Eventually, cigarettes will fade as a fix for physical and emotional needs, and you’ll make choices that actually address the signal your body is sending without thinking twice about it.

H.A.L.T. (Hungry,Angry,Lonely,Tired) is a powerful checklist to help you decode the urges to smoke that you experience.    Nine times out of ten, a craving can be traced to one of these four things:

Have a snack or a meal. If you are hungry, food is the answer, not a cigarette.

Anger is a big trigger for most of us. Find healthy outlets for your feelings of frustration. If at all possible, deal with the situation that is bothering you head on and be done with it.

Talk to friends and family about your feelings or write in your journal. The important thing is not to let anger simmer (\krodh utsukata Adi se bhara rahana\\) and get the upper hand(\majabut sthiti\\ ). Reaching for a cigarette can seem like a quick fix, but it is a false fix.

We may not always be able to choose the events that happen around us, but we do have control over how we let external situations affect us emotionally.

Come up with a few ideas of things you can do to help you shift negative energy that bubbles up before it has the chance to do any damage. That way, when a situation arises, you’re prepared. It will help you maintain control and get through it without smoking.

Remind yourself that no one has the power to affect your emotions without your approval. You control your inner environment, for better or worse. Take responsibility for how you feel and it will empower you to control difficult emotions smoke-free.

look for anger management …

Early on in cessation, distraction is a useful tool that can help you manage feelings of boredom. Get out for a walk, watch a movie, or work on a hobby. Come up with a list of things you enjoy doing and do some of them. Make them fun and they will help you over the hump of this type of smoking trigger.

For most ex-smokers, loneliness is more accurately described as boredom. Smoking was such a constant companion it was an activity in and of itself.

Early on in cessation, distraction is a useful tool that can help you manage feelings of boredom. Get out for a walk, watch a movie, or work on a hobby. Come up with a list of things you enjoy doing and do some of them. Make them fun and they will help you over the hump of this type of smoking trigger.

Depression also falls under this category. People quitting tobacco are especially susceptible to the blues, at least early on. Leaving cigarettes behind can feel like the loss of a friend, albeit a destructive, life-stealing friend. After years of smoking, most of us feel the loss of smoking in this way to some extent.

It’s ok to mourn the death of your smoking habit, but don’t glorify it as something it was not. It was out to KILL you, remember that!

Fatigue can be a big trigger for the newly quit. Instead of lighting up when you’re tired, give yourself permission to slow down and relax a little, take a nap, or go to bed early if you need to. Sounds so simple, yet people often push themselves too far with all of the demands of life these days.

Be aware and take care. Don’t let yourself get run down. A tired you is going to be more susceptible to junkie thinking and the threat of relapse.

Protect your quit by protecting your health, both physically and mentally.

It may feel like you’ll never be free of cigarettes and thoughts of smoking will always plague you, but have some faith in yourself and the process, and please be patient. We taught ourselves to smoke, and we can teach ourselves to live comfortably without smokes too.

Soon enough, you’ll get to a place where smoking cessation is no longer a daily effort. You may even wonder why you didn’t quit sooner, because life without cigarettes has become natural and easy.
\
We spent years learning to cope with everything from hunger to anger by lighting up, and when we quit, it can feel like triggers to smoke are hitting us nonstop.

If you’re hungry, have a snack or a meal. If the trigger is caused by fatigue, take a nap or go to bed. Angry? Deal with the issue rather than lighting up.

http://quitsmoking.about.com/od/cravingsandurges/a/Four-Steps-To-Defeat-The-Urge-To-Smoke.htm

the strong desire to become free of this addiction, a firm commitment to do whatever it takes to reach that freedom, and the kind of support you’ll find here at About.com’s Smoking Cessation forum.

It never works that way. People who return to smoking often spend years trying to quit again.

If you want to change your life, change your mind.
As smokers, we often think of lighting up as an enjoyable pastime. Cigarettes offer comfort, entertainment and companionship — or so we think. At the same time, we relate smoking cessation to feelings of pain, misery and sacrifice, and for most of us, these opposing feelings exist and are reinforced on a subconscious level. They’re below the surface of our thoughts, and the result is that we adopt unhealthy and inaccurate beliefs as facts of life when in reality they are only our distorted perceptions of the truth.

A first step in successfully developing the will it takes to quit smoking involves learning how to pay attention to what we tell ourselves and correct false statements as soon as they occur. It takes practice and patience, but if you keep at it, listening in consciously on the thoughts that go through your mind on a daily basis will become second nature, as will correcting those that don’t serve you.

Just as we condition our bodies to build strength and endurance, conditioning our minds is an exercise in building new associations that will help us put smoking permanently in the past.

“My friends wish they could quit smoking like I have. I remember how desperately I wanted to quit every time I lit up. It was a vicious cycle that I’m free of now.”

“Going to the party smoke-free will be a challenge, and I may feel uncomfortable, but it will provide me with the practice I need to learn how to live my life without leaning on cigarettes. After all, practice makes perfect. I know these discomforts are a temporary stage of healing from nicotine addiction.”

“I know that nicotine withdrawal is a temporary phase of the recovery process. The discomforts won’t last forever. I’m growing stronger with every smoke-free day.”

You get the idea. Replace thoughts that don’t help you with ones that do. Train yourself to change the way you think and feel about smoking. If you persist and work with yourself enough, consciously trained thoughts will ultimately lead you to a new set of beliefs, and from there, you can make changes that will stick — permanently.

Because nicotine is an insidious addiction. It weaves its way into the fabric of our lives, attaching itself to every activity and every emotion we have, until we think that, without our cigarettes, we won’t be able to function properly or enjoy life.

Posted in Uncategorized | Leave a comment

Can Your Team Pass The Elevator Test?

What are you working on?
 I'm fixing the sort order on this datagrid.
Why are you working on that?
 Because it's on the bug list.
Why is it on the bug list?
 Because one of the testers reported it as a bug.
Why was it reported as a bug?
 The tester thinks this field should sort in numeric order instead of alphanumeric order.
Why does the tester think that?
 Evidently the users are having trouble finding things when item 2 is sorted under item 19.

http://www.codinghorror.com/blog/2007/09/can-your-team-pass-the-elevator-test.html

Cultivate Teams, Not Ideas

 

If I had to point to the one thing that made our project successful, it was not the idea behind it, our internet fame, the tools we chose, or the funding we had (precious little, for the record).

It was our team.

 

If you give a good idea to a mediocre group, they’ll screw it up. If you give a mediocre idea to a good group, they’ll fix it. Or they’ll throw it away and come up with something else.

Posted in Project Management | Leave a comment

ubuntu

Linux

Tar & UnTar

untar .gz file

tar xzvf tarname.tar.gz

untar .tar file

tar -xvf filename.tar

tar a folder and sub folders

tar -cvvf foo.tar foo/

Finding files

sudo find / -name ‘filename’ -type d

Service Running on Particular Port

  • cat /etc/services | grep 60000

Searching in Files

  • grep “text string to search” directory-path
  • For recursively
grep -r “redeem reward” /home/tom

chown

sudo chown -R  vclub:users vclubcms/

chmod

sudo chmod -R 750 locale/

List of packages

dpkg –get-selections | grep curl

http://www.howtogeek.com/howto/linux/show-the-list-of-installed-packages-on-ubuntu-or-debian/

ubuntu ram size check

grep MemTotal /proc/meminfo

http://www.cyberciti.biz/faq/check-ram-in-ubuntu/

Installing LAMP

$tasksel

Select LAMP Server , click OK

Installing PHPMYadmin

update the apt repositiory by apt-get update

$apt-get install phpmyadmin

Install webmin

    1. sudo emacs /etc/apt/sources.list
    2. Add the following lines
    3. deb http://download.webmin.com/download/repository sarge contrib
      deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
    4. Save and exit the file
    5. Now you need to import GPG key
    6. wget http://www.webmin.com/jcameron-key.asc
    7. sudo apt-key add jcameron-key.asc
    8. Update the source list : sudo apt-get update
    9. Install webmin
    10. sudo apt-get install webmin
    11. Now you need to access webmin using https://serverip:10000/
  1. Login by root password.
  2. Create new user
  3. change the shell to /bin/bash for new user and www-data
  4. for new user secondary group to sudo
  5. By following this process when tried to login by newuser by putty gives following error
    1. Network error: Connection refused
    2. reboot the system.

ls command

display page by page

ls -l | more
ls -t | more
ls -t output_PaymentRQ_* | more

can use less by that we can move up and down .
we can use less and more without pipe.
ls –help
http://www.unix.com/unix-dummies-questions-answers/11163-display-result-one-page-time.html

creating sym link

ln -s /media/ExternDrive moreFilesLink

http://www.herikstad.net/2009/07/creating-symlink-in-ubuntu.html

Running password with sudo

echo “password” | sudo -S command_to_run
e.g.
echo “password” | sudo -S python manage.py compilemessages

escape shell special characters in a string

$ var=’; echo gotcha!’
$ eval echo hi $var

http://manpages.ubuntu.com/manpages/natty/man1/escape.1.html

rename file name

rename ‘s/^view//’ .py

Shell Scripting

#!/bin/bash
mydir=$(dirname $0)
export PYTHONPATH=$mydir
export DJANGO_SETTINGS_MODULE=vclubcms.settings
cd $mydir
echo ‘done’ >> $mydir/output.txt | echo “bij897jib” | sudo -S python $mydir/manage.py compilemessages –settings=vclubcms.settings
echo “password” | sudo -S touch $mydir/apache/django.wsgi
cd /var/www

Aliases

http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html

Posted in Ubuntu/Linux | Leave a comment