Baligena.com has transferred its domain name out of Godaddy.
Haha whats up with the discount until 12/29/11 Godaddy. I hate when companies act as if they're above their customers and when the shit hits the fan they come back apologizing, expecting everything to be alright. But its too late to apologize and if Godaddy is having a hard time understanding, below is a video that will help.
Baligena is now with namecheap.com because it's being mention alot from internet advocates such as techcrunch, hacker news and reddit. Also they are also apposed to SOPA and I their current slogan. Exercise your right. Yes, you're damn right I'm going to exercise it. They also have good prices.
I invite you to join me.
Click here for step by step instructions on how I did it.
Tuesday, December 27, 2011
Sunday, December 25, 2011
Stick to you commitment
You lose track of your purpose when you achieve little success. You cannot change your path even though success is coming. Once you made a commitment you stick to it. -Baligena
Saturday, December 24, 2011
View all MySQL tables in console
You may be wondering why phpmyadmin is showing more tables than the console or vise versa.
The reason is because one of them does not have the privilege to view them all. I was having a issue with seeing all my tables in the mysql console and this is what fixed it. I had to log in as the root. (I'm using a linux computer)
$ /opt/lampp/bin/mysql -u -p
If its the other way around which phpmyadmin doesn't show all the databases is because you have put the wrong user in phpmyadmin source code. Change phpmyadmin settings to fix this.
tags:
phpmyadmin database does not match console
mysql hidden tables console
not all databases are shown in console
show all databases
The reason is because one of them does not have the privilege to view them all. I was having a issue with seeing all my tables in the mysql console and this is what fixed it. I had to log in as the root. (I'm using a linux computer)
$ /opt/lampp/bin/mysql -u
If its the other way around which phpmyadmin doesn't show all the databases is because you have put the wrong user in phpmyadmin source code. Change phpmyadmin settings to fix this.
tags:
phpmyadmin database does not match console
mysql hidden tables console
not all databases are shown in console
show all databases
Access MySQL console in Linux using XAMPP
Open the terminal and type:
/opt/lampp/bin/mysql
Then press enter and the terminal will turn into the console.
To exit the mysql console type exit and press enter
/opt/lampp/bin/mysql
Then press enter and the terminal will turn into the console.
To exit the mysql console type exit and press enter
Thursday, December 22, 2011
Programming Insomnia
Programming may give you Insomnia, it kept me up a couple of nights. Not because I had a deadline due the next morning but I couldn't stop thinking about coding. But this may be good insomnia. According to studies and also mentioned by VSauce when you dream about something difficult it's your subconscious trying to solve the problem. I had an experience once that I could not figure out a trigonometry problem but I went to sleep and woke up with the solution.
Monday, December 19, 2011
Listen to your users?
Steve Jobs from Apple made the statement that he doesn't conduct focus groups because customers don't know want they want because they haven't seen it yet. But there's a difference between being a visionary and not listening to users. When users were complaining about the IPhone dropping calls because the way it was held, Apple had to address that issue.
Another example is Todd Howard the directory of Elders Scroll Skyrim rated the best game of the year. Todd Howard personally goes on forums to read every comment to find out what players where complaining about until he hit mass success with Oblivion and couldn't read all of it anymore. He personally plays many successful and competitors games to find out what people are liking. He takes all this, new ideas and integrates into his game.
Another example is Todd Howard the directory of Elders Scroll Skyrim rated the best game of the year. Todd Howard personally goes on forums to read every comment to find out what players where complaining about until he hit mass success with Oblivion and couldn't read all of it anymore. He personally plays many successful and competitors games to find out what people are liking. He takes all this, new ideas and integrates into his game.
Friday, December 16, 2011
Don't fix what's not broken
Programs and websites are always trying to find the sweet spot between functionality and design, have those two things balanced. Now what sucks is having both of them close to perfection but changing it, like YouTube. YouTube new home page design is crap! How do you go from easy to use to hard. Yes it wasn't the prettiest design but the functionality was good. Functionality beats pretty any day.
The best program are self explanatory and use common sense. If a site needs a tutorial on how to use it, it's on the wrong path. WHY!?
Is it because they want their programmers to get busy like fast food restaurants make employers clean something that was already cleaned 1o minutes ago just for the the sake of being busy.
I understand change can have negative effect and it's necessary but when it jeopardizes usability. Someone needs to rethink their strategy, don't fix what's not broken.
The best program are self explanatory and use common sense. If a site needs a tutorial on how to use it, it's on the wrong path. WHY!?
Is it because they want their programmers to get busy like fast food restaurants make employers clean something that was already cleaned 1o minutes ago just for the the sake of being busy.
I understand change can have negative effect and it's necessary but when it jeopardizes usability. Someone needs to rethink their strategy, don't fix what's not broken.
Wednesday, December 14, 2011
You're being tracked
Be careful when you download torrents because it can be tracked. Checkout what you been tracked on youhavedownloaded.com
Monday, December 12, 2011
Turn PHP array into objects - stdClass
Want to access the contents of an array as simple as $array->firtParam
Here's how you do it
Multi-dimensional array example
Here's how you do it
<?php
$person = array (
'firstname' => 'Richard',
'lastname' => 'Castera'
);
$p = (object) $person;
echo $p->firstname; // Will print 'Richard'
?>
Multi-dimensional array example
<?php
function arrayToObject($array) {
if(!is_array($array)) {
return $array;
}
$object = new stdClass();
if (is_array($array) && count($array) > 0) {
foreach ($array as $name=>$value) {
$name = strtolower(trim($name));
if (!empty($name)) {
$object->$name = arrayToObject($value);
}
}
return $object;
}
else {
return FALSE;
}
}
?>
<?php
$person = array (
'first' => array('name' => 'Richard')
);
$p = arrayToObject($person);
?>
Reference
<?php
// Now you can use $p like this:
echo $p->first->name; // Will print 'Richard'
?>
Wednesday, December 7, 2011
Concatenate Variables names in PHP
This is for when you want to have a variable to be part of a new variable nam
$var1 = 'category';
$var2 = 'one';
${$var1.$var2} = 'sometext';
//OR
$var1 = 'category';
$var2 = 'one';
$var = $var1.$var2;
$$var = 'sometext';
/*
this creates the var $categoryone
with with the value of 'sometext'
*/
$var1 = 'category';
$var2 = 'one';
${$var1.$var2} = 'sometext';
//OR
$var1 = 'category';
$var2 = 'one';
$var = $var1.$var2;
$$var = 'sometext';
/*
this creates the var $categoryone
with with the value of 'sometext'
*/
Monday, December 5, 2011
Do not develop in IE or Opera
Opera is suppose to be fast and conserve bandwidth because it downloads the page onto your computer but it sucks for developing!
The issue is the downloading makes the changes unaffected in development mode. I spent hours trying to fix the position of a background to later find out that I had delete the downloaded data for it to display correctly.
To delete the data go to Opera>Settings>Delete Private Data.
Now Internet Explorer does the same thing but it sucks in everything. I wish IE will disappear from the face of the earth.
The issue is the downloading makes the changes unaffected in development mode. I spent hours trying to fix the position of a background to later find out that I had delete the downloaded data for it to display correctly.
To delete the data go to Opera>Settings>Delete Private Data.
Now Internet Explorer does the same thing but it sucks in everything. I wish IE will disappear from the face of the earth.
Friday, December 2, 2011
960.gs Bookmarklet
Reference
The bookmarklet below will draw grids on your webpage
Tags:
grid
The bookmarklet below will draw grids on your webpage
javascript:(function(){var%20jqLoader={go:function(){if(!(window.jQuery&&window.jQuery.fn.jquery=='1.3.2')){var%20s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');s.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(s)}this.ok()},ok:function(){if(typeof(window.jQuery)!=='undefined'&&window.jQuery.fn.jquery=='1.3.2'){this.init()}else{setTimeout((function(){jqLoader.ok()}),100)}},init:function(){$.getScript('http://www.badlydrawntoy.com/static/960grid/js/jquery.960grid.bk-1.0.min.js',function(){$('body').addGrid(16)})}};jqLoader.go()})();
Tags:
grid
Saturday, November 26, 2011
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.
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.
Friday, November 25, 2011
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
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
Wednesday, November 23, 2011
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
Monday, November 21, 2011
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.
Notes:
Case Sensitive => Linux, Unix, Javascript
Case Insensitive => PHP, Windows
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.
Notes:
Case Sensitive => Linux, Unix, Javascript
Case Insensitive => PHP, Windows
Friday, November 18, 2011
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:
How to create your own:
The secret lies in returning the object (this). It resets the object allowing the next chain to use it.
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:
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.
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)
The secret lies in returning the object (this). It resets the object allowing the next chain to use it.
Wednesday, November 16, 2011
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.
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.
Monday, November 14, 2011
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@192.168.0.175/GitServerFolderCreatedLocation
# 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]
Subscribe to:
Comments (Atom)