Monday, December 31, 2012

It Can't Be About Me Ultimately

Today I was coming home from work.  I was feeling okay but not ebullient to tell the truth.  I got to the subway and a young man was there.  He needed to get on the subway.  I bought a Metrocard and put him on the Subway.   Right after that I felt a ping of light in my soul.  It felt really good to do something for someone else where I had to sacrifice in order to do what was right.  

It felt good.

Then I realized what I wanted to do when I hit 10,000 dollars.  I want to take 1,000 dollars and go back to Hollis.  And I want to spend the day camped out in a supermarket and look for single mothers struggling to make ends meet.  Then I want to pay for their groceries.  

I want to give back.  Because that's the reason for making it in the first place.  It can't be about you.  It can't be about me.  It has to be about people who need help.  I've made a lot of mistakes in my life.  But I know this is what's right.  This is the right path.  Earn and give it back to help someone else.

Saturday, December 29, 2012

To Do List (Sunday)

-- Courier Weight Screen:
-- Give Courier Weight a real button
-- Change the Courier Weight item list to a limited list. (Done: 12/31/2012)
-- Confirm current location using GPS on Courier Weight screen.

-- Courier Jobs Screen:
-- Write CGI script
-- Load Courier Jobs from CGI script
-- Redesign the Courier Jobs page to show more information.
-- Write CGI script on choosing a job:
     -- Confirm the job is still available
     -- If available take the job.
     -- If not say the job is not available + reload the available jobs

Friday, December 28, 2012

AES 256 Encryption/Decryption

http://stackoverflow.com/questions/9794383/aes256-decryption-issue-in-objective-c

SHA1 Objective C Encryption Code


http://www.makebetterthings.com/iphone/how-to-get-md5-and-sha1-in-objective-c-ios-sdk/

Potential Investors for the Future

A Thought for the Future

Work Plan Part 2

Here's the next part of the Work Plan:

1.  Plan work on iPhone App

Courier Screens:

-- Courier Weight Screen:
-- Give Courier Weight a real button
-- Change the Courier Weight item list to a limited list.
-- Confirm current location using GPS on Courier Weight screen.

-- Courier Jobs Screen:
-- Write CGI script
-- Load Courier Jobs from CGI script
-- Redesign the Courier Jobs page to show more information.
-- Write CGI script on choosing a job:
     -- Confirm the job is still available
     -- If available take the job.
     -- If not say the job is not available + reload the available jobs

-- Orders Screen:
    -- Build in a cancel button
    -- Build cancel job cgi script.
    -- Build cancel job code into iPhone app.
    -- Build in alert message that will tell the courier that by accepting the job and then cancelling it will negatively affect his Trust Score (the score that affects the price level of the jobs they can accept).
    -- Build in Job Done button
    -- Build Job Done cgi script

-- Build Account Information Controller
    -- Name, Address, Phone Number
    -- Design this (look at the Database to do this)

-- Look into why view controllers are crashing 

Customer Screens:

-- Build Saved Addresses CGI

-- Investigate Maps Solution for iOS (development) -- Everything stops until this is done.

2.  Rebuild first GFM page -- Gimp here I come.
      -- Build GFM Piece
      -- Build button (courier)
      -- Build button (customer)
      -- Update:  All done 1/2/2013.  Nice.  Whew.

3.  Encrypt the transmission of data from the iPhone app to the Restful service.
-- Not necessary from an iPhone app as no one will see the address going out.

4.  Rip out the unnecessary parts of the iPhone piece.
-- Done.

5.  Replan the work. 
-- See above.

Thursday, December 27, 2012

Quantum Leap

Today I got my server to output a JSON Object and got my iPhone to listen to it.  

This is a very big day.  Because that happened now all it's a matter of doing is programming like crazy to build the code that I need built.  

This is a very big deal.  Now my web applications can talk to mobile devices and to the database and all three can work in tandem.  This is the basis for my future endeavors for the next five to seven years.  This is very big.  Very big.

The intersection of the web and mobile is a nexus where a lot of very cool things can happen.  I am looking forward to it.  Very cool.

Consuming a Restful Object with an iPhone

Monday, December 24, 2012

Future Business to Buy

Using Perl to Build Objects

JSON and Perl

AWS, Memcache, and iPage

First, note to self.  I stopped watching this video at 20 minutes.  I'll have to come back to it eventually but not right now.

AWS Overview

So a couple of things.  

So I asked the guys at iPage if they supported Memcache and Gearman.  They said no.  Then I looked at AWS.  It's expensive.  15 bucks per month per server.  Right now I'm paying 2 dollars a month.  That's actually freed me up to do somethings.

First,  I should be done with alot of my projects faster because I'm not going to actually use AWS and therefore GM and MC until I actually need them.  That allows me to build my programs in a rapid OO fashion and roll out projects alot faster.

So I should be done with all three of my projects by January of next year.  I should have betas online and actually start generating some revenues.  Then I can move along with AWS when I'm confident that I'm actually getting some hits and things are working out.  This is a good system as it will allow me to move more rapidly.

It also speeds up the learning curve.  Exciting!


Sunday, December 23, 2012

Blogging and the Comeback aka Work Plan Part 1

Yesterday I discovered web hosting.  And just like that all of my dreams returned to me.  

I temporarily left the path that I had designed for myself.  I left the path of technology and building a real set of companies and started toward the path of individual self fulfillment.  I hit a brick wall of networking technology and just couldn't do it.  I didn't have the energy.  I needed to get away.  

The reason wasn't that I was too tired to learn more.  It was just that I was tired of learning.  At some point you don't want to learn something new, you want to use the knowledge that you've all ready acquired.  Programming was that knowledge.  

Then yesterday I was tooling around online and they shut both my Twitter accounts to promote my blog.  Well, then I started tooling around looking at other blogs and YouTube showed me something about web hosting.  I watched a couple videos and an hour later I had a host online.  The lights came back on in my dreams and I knew I was back.  I feel so empowered by this.  

So the goals:

1.  Migrate the MySQL creation script over to my hosted site.
12/23/2012: Done.  Sweet.

2.  Change the DB info in the PHP Scripts.
12/26/2012: Done.  Sweet.
3.  Migrate the PHP scripts.
12/26/2012: Done.  Sweet.

4.  Make sure the PHP file directory is locked.
12/26/2012: Done.  Sweet.

5.  Create a subdomain (test.go-for-me.com)
12/26/2012: Done.  Sweet.

6.  Password protect test.go-for-me.com
12/26/3012: Done.  Sweet.

7.  Test that the site is visible.
12/26/2012: Done.  Sweet.

8.  Do a little security stuff (make a list).

9. Set up a CGI script.
-- Things to do about this:
a.  Add database piece
-- 12/26/2012: Done.  Sweet.

b.  Add JSON piece.
-- 12/27/2012: Done.  Cool.

10. Make sure script is visible from iPhone app.
-- 12/28/2012 (2:13 am):  Done.  Awesome.

11.  Continue developing iPhone app for GFM.
See Blogpost: Work Plan Part 2.

Friday, December 21, 2012

Love is Pain

Love means vulnerability.  Vulnerability inevitably means pain.  Unless she's the one.

Thursday, December 20, 2012

Blog Ideas

The Resurrection of the Republicans

Give 'Em Hell Hagel

Blogging Link

Focus and Freedom and Networking

So I thought I'd be able to quickly network my computers and be on my way to cutting code, the thing I really enjoy doing.  But alas, no such luck.  

Networking these Linux boxes is not so quick and no easy task ... because I've never networked a computer before.   (Those guys from Google made it look so easy!)  So I'm faced with a dilemma.  Stop or keep going.  

I am only a few short steps away from getting to the place I want to and need to be.  Cutting code.  But I can't cut code until I get these computers to talk to each other.  So what do I do?

I keep going.  Why?  Because every step I take is one step closer to freedom.  I want to be free.  I need to be free.  Lincoln freed the slaves.  But he didn't free the workers.  And in order for a worker to be free I estimate that at my current cost of living it'll cost me 1 million dollars.

One million dollars.  

In order to get there I need to have some type of business selling things for me while I'm working.  It has to be earning money for me while I'm sitting at work doing stuff.  I need to make my knowledge work for me and turn that knowledge into capital.  In order to do that I have to network these computers.

I'm tired of getting up and going to work in the morning for someone else.  I want to get up, have my employees come to my apartment or to my building and work in the morning.  I want my own shop and I want enough money to say screw it.  I want my freedom.  In order to get my freedom I need to focus.  

Sure I could start a blog and write about other stuff.  But I won't.  Focus.  Intensity beats expansiveness every time.  I have to get there.  I must.  So I'll go smoke a stog. I know.  It's terrible.  Watch a bit of Hajime no Ippo and start reading.

The goal tonight:  read 20 pages and understand 20 pages about networking and by the end of next week start cutting code.  I must get there.

Monday, December 17, 2012

ip addr list

ip addr list
-- listing all the information about all the ip addresses on the system


Ending the tail command

Ctrl + C ends the tail command.

To look at the file while it's being generated: tail -F /var/log/messages

Wednesday, December 12, 2012

Finding Default Gateway in Fedora

Type  route -n at the shell prompt.

The line with UG on it in the gateway column is the default gateway.

Monday, December 10, 2012

Viewing the Tables in a MySQL Database


To login (from unix shell) use -h only if needed.

# [mysql dir]/bin/mysql -h hostname -u root -p

Create a database on the sql server.

mysql> create database [databasename];

List all databases on the sql server.

mysql> show databases;

Switch to a database.

mysql> use [db name];

To see all the tables in the db.

mysql> show tables;

To see database's field formats.

mysql> describe [table name];

Installing MySQL on Fedora 15

Make sure you have a Internet connection (which you do if you're looking at this).

Then just follow these steps.
Navigate to the root.  

cd /

Then do damage.

su #for root login, enter password when prompted
yum install mysql-server
service mysqld start
mysqladmin -u root password PASSWORD_HERE
yum install phpmyadmin

su #for root login, enter password when prompted
service mysqld restart

SQL Command to Restore a MySQL Database


backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql

Thursday, December 6, 2012

Whatever He Is

When I was dating my most serious girlfriend her roommate said to us one day as we were leaving the house, "I'll take my doctor-lawyer over ... whatever he is."

It shocked me.  It shocked me to the core.  Even to this day I'm still struck by it.

I met her boyfriend.  He was a good guy.  There's no fault against him.  But she was somewhat right.  I didn't know what I wanted to be.  I was trying to figure it out.

Did I want to be a lawyer?  Well, being a lawyer would be fun but I also figured it'd be pretty selfish.  You see, lawyers at the end of the day don't create anything.  They don't create any wealth or any product.  All they create is a whirlwind of paper and fee schedules if they're good.  Maybe they create history with a case but that just didn't seem to be a just contribution.

Well, a politician maybe?  Well, that seemed to be a job in which you attempt to manage the affairs of the country but what have you made?  What have you created?  How have you given?  It seems to be the job of a second career but not a primary one.

What about a trader in finance?  Well, that seems to be a lawyer rehashed.  Ghandi said wealth without work was a sin.  I happen to agree and that seems to be the business most traders are in.

What about show business?  While thats creative and contributive it really seems to be a party for one.  Sure  you can employ a handful of people but by-and-large it seems to be a very intensive activity while it doesn't have enough room to bring others along.

Well what did I want out of life?  I always prided myself on being smart.  I wanted something that allowed me to use my mind in new and creative but concrete ways.  I also wanted to create something that would allow me to hire plenty of people, sharing the prosperity and growing it for an entire community and not for a small handful of people.  I also wanted to create something long lasting, substantive.  

Today I spent all day trying to figure out how to complete technical goals and I am so happy that I stuck with technology.  It really accomplishes everything that I thought of.  It is wildly creative.  It is like playing a concerto lightly on the stars of logic.  It allows one to mix their dreams with technical know how which mixes the left and the right brain into a heady brew.  It allows for hiring, for giving opportunity to others.  And most important to me it allows for substantive achievement. Not ephemeral achievement but real achievement that can benefit the lives of others for years, even decades to come, perhaps even lifetimes.  Finally it embraces my ego and allows me to show the world what I can do, what I've dreamed of.  It allows me to showcase my imagination.  Technology.  A technologist, an industrialist, a futurist, a businessman, a visionary, that's what I am.

Granting Shutdown Rights to a User (SQL Command)

GRANT SHUTDOWN ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password'

Actually shutting it down:

mysqladmin shutdown -u root -p
(Type in password when prompted)

Access MySQL from Windows Dos Prompt


mysql -h localhost -u root -p (DATABASE NAME HERE)
Then enter the password (if you use a password).

Then welcome to the world of magic.

How to Back Up a MySQL Database Using mysqldump

0.  Start the command prompt in Windows.

1.  Migrate to the bin folder of the MySQL Database so in my case it's: cd C:\Program Files\MySQL\MySQL Server 5.5\bin

2.  mysqldump -u root -p --databases <databasename> --result-file=c:\dbbackup.sql

Booyah.  Done.  Hopefully.

How to Transfer a Database to a Different Server (Directory Style)


You don't even need mysqldump if you're moving a whole database schema, and you're willing to stop the first database (so it's consistent when being transfered)
  1. Stop the database (or lock it)
  2. Go to the directory where the mysql data files are.
  3. Transfer over the folder (and its contents) over to the new server's mysql data directory
  4. Start back up the database
  5. On the new server, issue a 'create database' command.'
  6. Re-create the users & grant permissions.
I can't remember if mysqldump handles users and permissions, or just the data ... but even if it does, this is way faster than doing a dump & running it. I'd only use that if I needed to dump a mysql database to then re-insert into some other RDBMS, if I needed to change storage options (innodb vs. myisam), or maybe if I was changing major versins of mysql (but I think I've done this between 4 & 5, though)

Wednesday, December 5, 2012

Resetting a MySQL Root Password in Windows


C.5.4.1.1. Resetting the Root Password: Windows Systems
On Windows, use the following procedure to reset the password for all MySQLroot accounts
  1. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list and stop it.
    If your server is not running as a service, you may need to use the Task Manager to force it to stop.
  2. Create a text file containing the following statements. Replace the password with the password that you want to use.
    UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
    FLUSH PRIVILEGES;
    Write the UPDATE and FLUSH statements each on a single line. The UPDATE statement resets the password for allroot accounts, and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change.
  3. Save the file. For this example, the file will be named C:\mysql-init.txt.
  4. Open a console window to get to the command prompt: From the Start menu, select Run, then enter cmd as the command to be run.
  5. Start the MySQL server with the special --init-file option (notice that the backslash in the option value is doubled):
    C:\> C:\mysql\bin\mysqld --console --init-file=C:\mysql-init.txt
    
    If you installed MySQL to a location other than C:\mysql, adjust the command accordingly.
    The server executes the contents of the file named by the --init-file option at startup, changing each rootaccount password.
    You can also add the --console option to the command if you want server output to appear in the console window rather than in a log file.
  6. After the server has started successfully, delete C:\mysql-init.txt.
You should now be able to connect to the MySQL server as root using the new password. Stop the MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.

Spiritual Progress

I feel so much stronger than I have in a long time preceding.  And it's not a bravado type of strength.  It really is a true strength, a spiritual strength.  I feel more centered and unmovable than I have in a very long time.  My strength is not flighty or flippant but rather I feel a substantive strength that if nurtured, if shepherded, will grow into an abundance of strength, forged through God's will, allowed through God's good graces.

I was just meditating on a verse, a verse that says:

And we know that all things work together for good to them that love God, to them who are the called according to his purpose. -- Romans 8:28

I truly believe that.  Looking back upon some of the mistakes and events of my life I can see the Hand of God weaving a beautiful tapestry, and while I saw it often as pain and confusion I can now see the outlines of a story, a testament even, that I can turn around and point to for my family and say with no equivocation, "Look what the Lord has done."

New Chapter

I can't help but think that my life is starting a new chapter.

To be sure I am at a precarious time.  My job is teetering a bit.  (I have to develop a reputation for being as church mouse quiet here.  I am working on it.)  Therefore I need to be careful at this particular point, specifically over the next thirty days and definitely over the next 90.  Then I can think farther out.

But as for the new chapter.  I can't help but think that my life is starting a new chapter.  Yesterday I installed the hard drives into both of my servers, networked them, and did some other stuff.  And while they're not completely finished yet it marked a significant turning point in my life.  It is the actual physical embodiment of my dream, my planning, coming to fruition.

Today I walked outside and instead of being worried and looking at the buildings as walls, I looked up and saw penthouses.  I found myself looking at the tops of the buildings as opposed to looking elsewhere.  I found myself with a new sense of purpose, a determination, a clear and compelling vision for my life that I am eager to fulfill.  It is truly exciting.

While I truly do not care for my bosses boss (she just walked past me and makes it plain that she does not care for me) that is fine.  She is an obstacle in my path.  I must simply steer clear of her and remain focused.

I feel that for a long time I have been searching for a true North.  All of my life I have wanted to build something, to be a builder.  And now I see that in this life my path is just beginning. 

I feel stronger and more focused.  I am a man with a goal.  I am a man with a plan that is making significant progress on that plan.  Quick.  Quick.  I have big goals and only 55 years in which I can achieve them!

Tuesday, December 4, 2012

Rockefeller's Resolve

I have a new respect for John D. Rockefeller.  

It takes tremendous self discipline to gain extraordinary wealth.

John D. Rockefeller once was in his office.  A man entered and asked him a question.  Rockefeller had a few quarters in his hand.  He walked over to the window and stood in front of the it dropping the quarters repeatedly in his hand.  He did this for fifteen minutes.  As he dropped the quarters he listened to the young man behind him, exhasperated, sighing and carrying on.  He smiled to himself.  He admired the self-discipline he had to achieve while others could not control themselves.  He attributed his success to his self-control.

It will take tremendous self discipline for me to achieve my goals.  But I will achieve them.  It will start with keeping this job.  (See Thin Ice, another blog entry).  

It will continue with me staying focused on the task at hand and being financially disciplined.

I am not likable in the Obama way.  I know that.  But that doesn't mean that I can't have tremendous influence on the world for the good.

But I will have to daily improve my resolve.  This is the first task.

Thin Ice

My bosses boss told her today that she would fire me if she heard me make noise again.  

I guess I tend to be a noisy guy.  It's not conscious.  It's not intentional.  But I can be noisy.  

But noise isn't really the problem.  The problem is that she doesn't like me so she's setting up the logic for her position.  It's not that I've really done anything that wrong but not being likeable is a problem.  I'm not very likable.  My sister came over this weekend.  She won't admit it but honto (Japanese for truthfully) she doesn't even like me.  So I'll have to build my life on something besides like.  That's okay.  At least I know it.

As for my bosses boss.  If I can get to May I can save up 15,000 dollars.  That's enough to breathe a bit.  That's my goal.  May.  It will give me a year here and I'll be able to do well there.  

The first goal is January.

Then February.  (She's usually gone in Feb but Feb might be best). 

Then March.

Then April.

Then May.  

Then it's time to replan.  But that's the goal.