This is pretty funny. I guess I don’t mind reading other people’s code but at times you feel like this:
Author Archives: Ryan
NTP Sync on Android
For some reason my android G2x phone started giving me the completely wrong date. I am not sure if the network provider Natcom is sending the wrong date or what. I switched to syncing using NTP. So far so good. All I needed to do was point it to the right server which was the following:
pool.ntp.org
Then it synced right up to the correct time/date for my location!
Sencha Touch Disable Default Caching on JS Files _dc
I didn’t find much documentation on it, though I probably just missed it somewhere 😀 If you are using Ext.Application for building up your Javascript files then you will want to know how to disable the nocache mechanism that is setup by default. You will notice that the files have *.js?_dc=<insert timestamp number here>. It’s simple to fix this problem.
1 2 3 4 | Ext.Loader.setConfig({ enabled: true, disableCaching:false }); |
Just add the disableCaching to false and your good to go!
Natcom Haiti Phone Setup
The newest phone carrier in Haiti is Natcom. It is a bit cheaper then the competitors. I switched over because the internet had a pay-as-you-go service which I liked. Natcom is also offering 3G and 4G. I didn’t believe it at first but after running a speed test on it, I did in fact verify that it was truly doing 4G.
Natcom has four different plans for Haiti:
- MI-1. This is for paying 2.4 HG per Mb.
- $0.06 per Mb.
- MI-2. You pay 80 HG for 50 Mb. $2 US
- 1.6 HG per Mb or in USD $0.04 per Mb.
- Charges you 2.4 HG per Mb after you use the 50 Mb.
- MI-10. You pay 400 HG for 600 Mb. $10 US
- 0.8 HG per Mb or in USD $0.02 per Mb.
- MI-U. You pay 800 HG for unlimited. $20 US
How do I sign up?
- First you need to get a SIM and then activate it by calling another person.
- Once you have activated your SIM then start adding on minutes. You will need to add on the amount of which the plan requires in order for you to activate the internet on your phone.
- Text the MI<number of plan> to 132. So for MI-10 you would type “MI10”.
- You will receive a text back to which you need to reply either YES to confirm or NO to cancel.
- Once you type YES – you are all set to use 4G service in Haiti!
The way that the plan works is that it will renew with that same plan next month. So whichever plan you pick it will keep it for the next month and charge you accordingly.
How do I change plans?
You can change plans at any time. To cancel your plan you can type OFF to number 132. When you change plans it will pro-rate your plan based on how far into the month you are.
If you want to change plans – It is recommended that you text the code you want *before* the beginning of the next month. Once the first of the month begins Natcom will automatically try to deduct the amount of your currently subscribed internet plan.
Trouble?
If you are having trouble getting the Natcom Haiti internet working it may be because you need to enter the Natcom APN.
Natcom APN: natcom
MCC: 372
MNC: 03
*You may or may not need to enter the MCC and MNC. Some phones seem to find it automatically.
* Updated March 1, 2013 – Added in How do I change Natcom Haiti plans and the “Trouble?” section
Amazon EC2 Server CPU 100%
I signed up for the free year using the Amazon EC2 micro instance. I was pretty excited to move off of my home server. As mentioned in previous posts. Unfortunately as mentioned by other posts, it doesn’t take much to bring down your system. I currently have hosted a few WordPress blogs on this server and as soon as it is crawled by Google, Bing, or others it immediately goes up to 100 percent cpu usage and then is stuck there until I can manually reboot it.
Here are a few attempts at fixing the problem which I have done so far in order to prevent these spikes:
- Added WC Super Cache. The goal is to take weight off the database hits by providing a HTML cached version of the page. When the website gets crawled it will be able to serve the pages quickly and also not max out the CPU usage.
- Signed up for CloudFlare. This does caching as well and blocks potential threats to your website.
- Tune Apache. Here are set of recommended choices from someone:
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 20
MaxRequestsPerChild 5000
How to Make an iTunes Podcast
To a developer a podcast is just an mp3 or some other format. That’s really about it. In order to hook it up to iTunes you need to make sure it is served in the proper format and follows their guidelines. It is not to difficult.
- Record the audio. Audacity is free. An alternative would be Aviary.
- Save the audio file (in MP3 format) to your computer desktop. Do not use special characters in the file name.
- Add ID information (Artist, Album). Optionally give it album art.
- Create an RSS feed. A standard RSS feed will do. The easiest way to do it is to use a blog. I picked Blogger.com and started a blog with the title of my podcast. Hold off on posting just yet.
- Go to feedburner. Type in the URL of your blog and click “I am a podcaster“. In the next screen, configure the elements for your podcast. These are the elements that directly relate to the podcast. This is your official podcast feed. Almost ready to submit to iTunes.
- Upload your podcast. This needs to be upload to a public location where you can have a link to your podcast. I just added the podcast on my server under a /podcast directory. You can find public domain websites as well.
- Make your first post on your blog! The title of the post should be the title of that episode of the podcast. The content will end up as the description. Most importantly, at the end of the post, put a link to your mp3 file.
- You may need to wait a bit for feedburner to update the feed. Feedburner also has a page that you can use which will force it to update. Useful in testing.
- Submit to iTunes. Now go to the iTunes store and click podcasts. You will see on the right side of the page a link to submit podcast. There you can enter your feedburner link and wait for approval from Apple!
WP Super Cache for WordPress
Alright, so the site was not necessarily slow. The problem is that on EC2 micro instances a bot can take down my website. Still an issue but one way someone recommend to help the issue is to use the super cache plugin which will make html files and doesn’t spike your CPU on the instance. Here are the stats:
Before adding super cache:
ryanandmelissaalberts.com 97.41 KB 0.71 seconds 0.01 seconds
After enabling super cache:
ryanandmelissaalberts.com 97.43 KB 0.41 seconds 0 seconds ryanandmelissaalberts.com 97.43 KB 0.34 seconds 0 seconds
Task Management / Project Management @ Non-Profit
I am sooo excited! After searching endlessly (must have signed up for 20 different online sites)… I found the most amazing task management/project management software! It’s free. Works on web, iphone, android, ipad. It’s created by Fog Creek (Joel Spolsky), so you know it’s amazing. This day just got great! Now to use it on a test project in our organization to prove it out. Oh, it’s http://trello.com!
Bios Reset Password Dell D610
I had someone here ask to reset the bios password. Usually a very easy process for desktop computers. I had honestly not done one on a laptop before. Thinking there were going to be nice buttons of some kind… wrong!
First you need to remove the back skin of the laptop. Might be possible to just remove the cmos battery cover. Then you will need to use a paper clip to jump the bios chip.
The big chip pointed to is the one that we need to jump in order to reset the bios password.
Short the pins shown above in order to reset the password.
You should be in business after that!
Windows 7 Backup – Error Code (0x8078007D)
I was consistently getting this error when trying to backup my computer using the Windows 7 built in backup. Finally, I just tried not using the custom backup folders and everything appeared to backup with out any issues.