>Don’t focus on the pain

>Don’t focus on the pain until the pain comes. When you go to exercise the main reason you procrastinate is because your trying to avoid pain but if you don’t focus on that but focus on putting you clothes, then walking out the house, sketching and so on. Focus on the next step.

In programming I use the same philosophy. If I think about building this huge software I’ll get discouraged but if I focus one day at a time, adding to a little each day makes it a lot easier to move foward.

>Autostart XAMPP in linux ubuntu

>This is the simplest and easiest way to autostart automatically xampp when your computer boots

1. run the line below in terminal, this opens the file rc.local for editing
$ sudo gedit /etc/rc.local

2. write this line of code in the file rc.local. Make sure you follow the instructions contained in the file
/opt/lampp/lampp start

3. save and exit

#no need to edit init.d

>Quote: Pain Period

>“The last three or four reps is what makes the muscle grow. This area of pain divides the champion from someone else who is not a champion. That’s what most people lack, having the guts to go on and just say they’ll go through the pain no matter what happens.” -Arnold Schwarzenegger

>Keep it Sensitive, Case Sensitive!

>They’re case sensitive operating systems and programming languages, and others that are not. Now do you give in to the medium rules or do you stay congruent no matter what or where you are developing?

This is an easy question. Of course you stay congruent across mediums but the challenge is discipline. Because not being congruent today may not effect you now but it will in the future, like it happened to me.

Recently I transferred my websites from my windows to Linux server. I could not get the sites to work on Linux. After hours of debugging I found that the error lied in the case of the string. Not only did it effect my variables but also the URL. I looked around for a way to change this feature but realize that its a good thing to have. I was practicing a bad habit and needed to brake it now.

Now when you have that thought “Is this case sensitive.” You’ll know what to tell yourself. Keep it Sensitive.

Ways to be congruent:
Defining your variables, folders, files and so on in a standard naming convention. Camel back (camelBack) your variables and capitalize your classes.

Case Sensitive => Linux, Unix, Javascript
Case Insensitive => PHP, Windows

>Javacript Chaining

>Javascript chaining pattern is the process of stringing methods/functions together without
having to recall the object. jQuery made this pattern famous.

jQuery Example:

$('div').css('color','red').html("I'm a second chain");

How to create your own:

var chain = {
first: function(){ //a method
alert("I'm first");
return this; //this is the secret
second: function(){ //another method
alert("I'm second");
return this; //this is the secret

//The chain
chain.first(); //alerts only the first
chain.first().second().first(); //alerts first,second and first(order insensitive)

This benefits you because the object doesn’t need to be rewritten every time you want to use a method, resulting in less code. Call it once and add the methods to it.

The secret lies in returning the object (this). It resets the object allowing the next chain to use it.

>Mind Cloaking

>In my writing I have noticed that I can prof read and re-read and will not find any errors but if I change the background of what I’m reading on, the error becomes evident.

It’s like your mind is auto completing, tricking, cloaking the errors.

There may be a name for this occurrence. It seems similar to those images with a black dot in the middle where if you stare at it long enough a secret image will show or when two colors are next to each other they look like the complete opposite but when apart they’re only different shades of the same color.

This also happens in programming. You may be looking at a bug right in the face but you cannot find it unless you take a break or change the environment.

>Set up a Custom Git Remote Server like GitHub


In the server:
# have ssh installed on your server
$ sudo apt-get install openssh-server

# install git on both local and server machine
sudo apt-get install git

# navigate inside the folder you want to contain the repository
# create a new repository
$ git init

In local machine:
# navigate inside the folder you want to contain the repository
# create a new repository
$ git init

# set the origin
$ git remote add origin ssh://michael@

# update the server
# when pushing to the server make sure your not in the branch your pushing to
# you may need to fetch and merge (pull) before you can push
$ git push origin –all          #or $ git push origin [branch Name]

# update the local machine, get data from server
$ git fetch origin [branch Name]

>Skype Blacklist

>Skype can be used as a blacklist. Sort out the calls you do not want to receive. Smart phone have applications that allow you to block incoming calls but what about landlines? You can block calls from your ex-girlfriend, debt collector or some pre-recorded call offering you a business opportunity.

The way it works is to have a skype number and your original number (cell phone, landline). Redirect skype calls to your orginal number. Now you can give skype number to whoever and not worry about getting on some calling list because you can now block it. Every number blocked on skype will not be redirected to your original number creating a black list.

If you need details on how to set it up, how to block it. Leave a comment.

>Whitelist. A Javascript Object

>Blacklisted are those who access were removed and whitelisted are those who are specifically granted access or privilege. Below is a Javascript whitelist object.

var white = {
list: new Array(),
request: function(permitted){
for(var value in this.list){
if(permitted == this.list[value]){
return true;
white.list = ['jon','max']; //set who has can have access

//Lets test the object
//if access granted
alert('welcome VIP')
//not granted access
alert('Access was never granted to you');