Friday, November 2, 2012

Site Map and Competition Board



So yesterday I've starting two new projects that shouldn't take much time. The first one I've started is a site map for our main management site. What started me wanting to do this is the iPad and iOS 6. With this new iOS, the drop down menus don't work right like what I can do on my Android phone. You can tap on the menu, and go to that tap, but you cannot access anything that drops down. So I'm taking our header file and I'm going to create a site map that lists all links that are found in the header menus. So far I've striped out all the extra code I don't need and just have links in a table format. So right now it doesn't look pretty. But I'll keep everyone informed with how it goes, but I don't plan on spending much time on this at one time, more for when I need a break from other stuff.

The other project that I've started was a competition/tracking/motivation board on our sight to help keep our account managers motivated in filling spaces in our parks. With this they will be able to track the past weeks progress, whether it be good or bad, and see who did the best for the week. So the managers can put in what there totals where for each of the categories, and that will come up with a total points for the week. Now they have a chance to do a little challenge, like throwing a ball and making a goal, like into an empty trash basket, to earn higher points for the week. But it sounds like they will only get one chance to do it. If they make the goal, then they got the larger points for the week. But if they miss, then they lose all there points, and those points are divided up between all the other managers. Now each category has an x-factor to increase the total points if the bonus is made. So for each category, there are three things kept track of, the first one is what was your goal for that category for the week. Second is what did you achieve. The third is a bonus if you made your goal. So the goal section is worth no points, because its what you are striving to get. The second is worth one point for each home that meets that criteria. Then if the goal was made, then you get five additional points for that category. So things can add up if you set your goal and then make it. Then if you make the challenge of the day, then things can really add up. If the challenge is made, you get to apply the x-factor to the points for the second and third column. So this is what I have to create, and it will probably be done next week I hope. So far I've created the layout sort of with how I want it to look, then I'll need to do the back end math and data base back end for saving the different weeks.  So it doesn't sound like as much as I thought it would have been after talking about what I have done yesterday, and what I have to do, but we'll see.

Friday, October 19, 2012

Leaning with PBX in a Flash

So today I realized that the new PBX system wasn't secured from the outside world. The way we have things set up with it is eth0 is for the internal network, and eth1 is connected to the outside network, not being controlled by our firewall and DNS. That is where we connect to our SIP Trunk as well. So because of this, the phone system was a bit overly exposed to the cloud. So today I learned how to use WebMin and manage the IPTables that run on the system. So I changed a lot of rules to accept traffic only from eth0, thus locking out the outside world from some of the most easiest points of attack.

Then their was another thing that I found out today about the new system. It was using .htaccess lock to view voicemail. They tried to have admins add this back in March, but when I did, I didn't know my way around, and so I removed the locking file. But with this newer version, they had added it. So after spending lots of time trying to disable it, or find my way through it, I finally understood what the foram was saying for what to do about it. Here at http://www.pbxinaflash.com/community/index.php?threads/freepbx-2-10-latest-beta-voicemail-and-recordings-asks-for-auth-p-a-s-s-w-o-r-d.12407/ at about half way down where wardmundy is talking about what to do, it clicked what I needed to do. She gave the command to add a user for htaccess. She gave "htpasswd /usr/local/apache/p-a-s-s-w-d/wwwpasswd <username>". So I took that and started to enter it in and had to change it some. what I did was "htpasswd -bm /usr/local/apache/passwd/wwwpasswd <username> <password>" and that wrote a user in that file that I could share with everyone. So that was quite a learning experience for me, and a good one to know. 

Tuesday, October 16, 2012

Quick Report

So my boss today asked me if I could make a quick report that you can get to from the home page of our management site. So I touched up some of the things that the main page had, then created the page. Nothing new in it, but I did get to use the code I put for counting the days between two dates. Then I rounded that answer to 0 precision and then it gave me a number that looked clean and was whole days. Well, nothing much, but it's something. -Rob

Sunday, October 14, 2012

Sorry for the delay and updates

Sorry for not righting regularly like I had hoped and started out. It's a habit that I haven't developed yet. There has been some projects that I have been working on since the last time I posted anything. Some new things learned, but not that much has happened. One reason is that I normally can get about 8 to 12 work days a month to program. The rest of the time is support and closing books/ledgers to the next month and then cleaning things up so the reports can reflect what truly went on that month. There is a set list of things that I check each month, and then I'll fix them or find out why they are the way that they are. But starting the middle of last month, things started to change as far as responsibilities at work went. The reason is that my co-worker that also programed along with me got a job for Ancestry.com, and so that slowly made me the head of the IT department. So the beginning of this month, I started out as the head, and shortly after that, we hired some one new so we had two programmers in the office. Also I got a nice pay raise because of my position change. But my old responsibilities hasn't changed much yet. I'm in the process of acquiring someone new to do support full time. After that person (who ever it might be) starts, then I can focus more on directing and programing.

One thing that I have been working on this week is to start moving our VoIP system over to a physical computer to run on. One of the problems we have been having, and seems that it's not that uncommon with running the VoIP server on an VM is the jitter getting to be bad enough where the server has to re-sync the audio during a phone conversation. That means that there will be 3-5 seconds where audio cannot be heard one way or the other, or both parties cannot hear each other. We have tried to dedicate a whole processor to the VM, but that didn't fix the problem. So the next solution is to move to a physical box for the phone server. So this past week I got the hardware for it from NewEgg.com and put it together. Then Wednesday through Friday I have been working on it where I could to get it set to be the phone server for the office. So last week I got to the point where I feel comfortable to start configuring the actual PBX portion of the server this week. I'll try to keep everyone in the loop ask things go along. And I'll also try better to keep adding thing to this blog. -Rob

Thursday, March 8, 2012

Counting Days Difference using PHP

Sorry for not righting in here lately, not use to doing this, so here is something that I have learned this week. Have you ever wanted to find out how many days it has been between two days, well her is a way using PHP. I'll show the code I did, then I'll explain it.

$days = (strtotime($today) - strtotime($olderdate)) / (60 * 60 * 24);

Basically what has to happen is that you convert your dates to seconds with strtotime( ). Then subtract the two dates to get the difference between the two dates. The back half is 60 seconds times 60 minutes times 24 hours. That is 86400 seconds. So take your difference in dates and then divide that by the 86400 or 60 * 60 * 24. Now sometimes if the date has some information indicating time, and you only what to show days, then before you output, you will need to format to only show the number of days by encapsulate $days with number_format($days). This will only show the days without rounding the number.

I hope you enjoyed this little tid bit, thanks for reading.

Wednesday, February 15, 2012

Having fun with div tags

Today on my revamp of my first project, what I mainly did was change the basic layout from using tables to div's. The main content of this page is nested within tables that the framework is setup to use and div's for the accordion setup. What I ended up doing was setting my first div to be absolute to the page side, then build from there to be relative. This gave me a structure to bullet sections and then have the main content line up uniformly. Before it was using &nbsp; in a table cell to get things to work. This looks much better except for one line that is off compared to the rest. It's close enough for now (it's only a couple pixels to the left from everything else). So not much today.

Tuesday, February 14, 2012

$_SESSION issues

This was one of those moments where you ask "Why did I do that" for what I did with the $_SESSION variable. I was adjusting a report to put a header and footer on it and needed to pass information into the header when ever a new page was created. (This is using FPDF to create a PDF page) I started to try to pass it by $_POST, but that didn't work and also I wasn't submitting a new page, this was done on the loading of the page. So I used the $_SESSION variable to pass the information. But when I was trying to set the name of the variable, I used () to encompass the variable name and it keept giving me errors. Finally when I was looking up why it wasn't working, I read a page where someone was having the same troubles and one response he got was to try using [] instead of (). So that made me wander if that was what I did, and what would you know, it was. Boy I felt dumb after that for making a simple error like that. But I guess everyone has those moments every once and a while.

I should have more stuff to post the next week and a half as I am revamping a report like system that I created when I first started here and not knowing anything of how things ran and how people where use to seeing things. I worked with a couple of the managers that go out to the parks we own to get a new look designed and cut out all the extra stuff. So it's a shorter report, and will have more vital information that is needed to be seen in a short amount of time. So I'm sure I'll have things to say about that.

Thursday, February 9, 2012

Trouble Shooting and Security Cameras

Sorry I didn't post anything yesterday and being so late today, there hasn't been much going on. For all of this month till yesterday when I had time, I was trying to find a problem within our data for our property management web software. Each month I manually move the ledger system to the next month for each of the parks we own. As part of that process, I have several checks that I do to make sure that the property is ready to advance to the next month. One property of ours had a miss match from the money we collected to what it payed for. So it took me up till yesterday afternoon to find the problem and fix it. I had to load backups of our database to my development server till I could isolate when the problem happened and pick out what changes there where from before it happened to after it happened. Then I was able to find the problem and fix it. This problem was not like what normally happens when we have an allocation miss match, and normally it doesn't take that long to find and fix. Especially when I've been doing this for over a year now.

Then today I did some support tickets and in the afternoon set up a cameras remotely through Log Me In. Normally I support our different offices across the country through Apple's iChat Screen Sharing. But because this office had Window XP, I couldn't do my support my normal way. So once I helped them get it set up for my support account, then I got on and got things set up with their security camera as far as in there network is concerned. Now we just need Comcast open the modem up so they can web host the security camera to record in our office. Also while I was in their computer, I re-mapped a network drive coming from there other computer in the office so they could use there management software on this computer. After I did that, the employee there in the office said that he has had a couple people over in his office to fix the networking problem they had between the two computers, and they couldn't. I did it in under 5 minutes. All it was that the old network drive was set up by IP, and when they switched out there router with a new wireless one, the computers stopped talking to each other. So this time it is set up by the Net BIOS name, so if they have to swap out their router again, it shouldn't fail again.

It was nice doing something other than support and support tickets like I have been doing for most of this month so far, so it feels like. Sorry this is long, I just wanted to give you some background to help you follow what I was explaining. We'll see you tomorrow.

Tuesday, February 7, 2012

New VoIP System Reliability

So as promised, the fun we had getting the reliability up and running. Little did we know when we first was trying to get our system set up to work with our ISP, that how we had it connected was interfering with the reliability. While trubbel shooting the problems, we noticed that there where two, codec and reliability. After we got the codec fixed, then it was all our fault for the reliability. We where running the dedicated VLAN from our ISP through our fire wall, pfSense. And that was our problem. Once a UDP session was initialized from the out side in, we had about 30 sec. after that call was done to call out over our ISP SIP trunk. Once that route was cleared, then the system didn't know how to establish the UDP connection to the ISP. So we just bypassed our firewall and now it works like it should.

Monday, February 6, 2012

Finished Rebuild

I finished the iMac in setting it back up for use. We where able to recover files with Disk Warrior and backed up a lot. Then when we where finished, the disk died and we couldn't access it any more. Talk about just in time. So then I shut it down to cool down to work behind the monitor. Once it was cool enough, I swapped out the hard drive and put the new one in, boot it up, added a partition to the new drive, and started the install. Things went much smoother with the computer after the new drive was in and got everything back up and running on the computer. I also set it up to do backup's with time machine to a time capsule we have in the office. Now I have been given the assignment to go around to all computers to make sure that they are being backed up. I need to clarify who everyone is because we don't have the space for all computers in the office.

Friday, February 3, 2012

Tool Kit

The work continues to get the computer up and running. This morning before work I stopped by Lowes and picked up a fun Kobalt 27-Piece Speed Fit Micro Driver Set. It worked really well and made taking apart the computer really easy. I liked the set so much and because the tutorial was taking every thing out, I started doing that until a co-worker asked me what I was doing. Then I resized that the hard drive was accessible. So I plugged back in everything I unplugged from the main board and put the speakers back. We tried to get the data off the hard drive by putting it into a PC computer and using an Ubuntu Live CD to get to the data and copy it, but because of the file system on the hard drive and Journaling, we couldn't get the data. So we tried putting the hard drive into a mac tower, and it couldn't read the disk, the system just wanted to re-format it because it was un-readable. So we put the disk back into it's own computer/iMac, and put it back together as far as putting the screen back on, then we tried couple things to try to get the data like trying to boot into the disk, nothing. So we tried booting to the OS install disk and using Disk Utility, couldn't repair the disk or back up an image. So on Monday we are going to try to use Disk Warrior to see what it can do. Mainly why we are tying so hard to get information from the nearly dead hard drive is for one file that took a long time to gather information to create and is touched daily by the secretary. After that, then I can start the build of the new build of the OS on the new hard drive.

Oh ya, when I went out to get the new hard drive, I found out an interesting thing, hard drives are hard to come by right now. Because of the flooding that happened in Indonesia, hard drive production is greatly slowed and is making it tough to find hard drive. At Best Buy, there is a limit of one hard drive per customer. So I went next door to Office Depot, and they have a limit of 2 per customers. Nether stores had hard drives that I needed. So I went to a computer store in town named JPL, and they had some I needed for $15.00 more that what the others had them priced. So I finally got one and went back to work.

Thursday, February 2, 2012

Taking apart an iMac

To the interesting thing for today is taking apart an iMac. I needed to do this today because one of the computers for a secretary only has a couple hours at most left of life. So I need to get it out and into another computer where I can do a Live CD/USB and try to save all important data off of it while it can still spin. Here is the link I found that shows just what I need to do to take it apart. http://www.powerbookmedic.com/manual.php?id=97. It showed just what I need to do and all I can do today is take out the memory and take off the glass. I need to go get some T-6 and T-8 bits tonight to finish taking the computer apart. Also when I have those bits, I should be able to dismantel HDD's that have gone bad for the fun of it and keep the platters and magnets. HDD magnets are fun and strong i think. Don't worry about the rest of the story about our VoIP system, I'll tell it soon.

Wednesday, February 1, 2012

Fun with VoIP

Here in our office, we are woking on making the switch to VoIP and greatly reduce our phone bill. Its working great. Reducing a phone bill from somewhere around $700.00 to some where around $150.00 in one month, that's great. It's all being done by PBX in a Flash. So all managed by us, and not paying someone to do VoIP for us when we can do it. All we have to pay for is incoming lines at $0.10 a line and for outbound connection. That costs more, but we are doing it through our ISP. When they gave us the connection information for our SIP trunk, the codec was all wrong for us. They wanted to use G729. That is a license codec and we have not payed for it. Also from research, it looks to be the lowest quality of codec posible. So after we worked with our ISP, we got uLaw to work. Then we had issues with reliability. That I'll talk about another day.

Hello World

This is the first post to start the ball rolling. Just like any new programing thing, lets start this new blog with "Hello World".