How to Share a Project on Cloud9Ide

  1. Log in
  2. In the top left where your username is, either create a new context or switch to an existing context
  3. after switching to the context you have 2 tabs: projects and members
  4. choose members
  5. at the very bottom press the + sign
  6. type in the cloud9ide username of your friend
  7. go back to projects.
  8. add the contact to that project
Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

Vim Keyboard Messed Up

Is your Keyboard Messed Up when using Vim? Do the arrow keys do funky things? Do you get strange characters on your screen? If so, to fix this you need to set VIM into nocompatible mode. To do this, when using vim, type the colin key to get the menu at the bottom, and then type set nocompatible

This should fix it! :)

:set nocompatible

Vim Keyboard Messed Up

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

jsonip.appspot.com Over Quota

It appears that jsonip.appspot.com is over quota. What alternatives do you have?

  • http://jsonip.com/
  • http://freegeoip.appspot.com/ – This one is currently over quota as well

Have another? Post it below!

Or, Write Your Own with PHP:

<?php

$ip = !empty($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'';
$json = array();
$json['ip'] = $ip;

if(!empty($_GET['callback'])){
	//remove non standard characters if callback is set
	$callback = preg_replace('#[^a-zA-Z0-9\-\_]#','',$_GET['callback']);
}

if(!empty($callback)){
	//if callback still exists after cleaning up non standard characters
	//then call that function with the IP data
	echo $callback.'('.json_encode($json).');';	
}else{
	//else echo the IP data
	echo json_encode($json);
}

?>

Note: It is important to put this on a FAST server otherwise your webpage might hang when loading, especially if you are using the a doc-ready syntax for javascript.

Have improvements? Post them below.

Posted in Web Development | 2 Comments

The Three Ways to Get Gems in Restaurant Story

Food Prices, Time, and XP

Use this information to choose which foods you will serve. Perhaps you are going for money, or perhaps experience points to level up. No matter, this chart will show you the value of the food items you can prepare with the stove, and then calculations about how much of each thing you can accumulate per hour (ideally).

The Three Ways to Get Gems in Restaurant Story

Products

Some products include:

  1. Omelettes
  2. Fruit Salad
  3. Bacon & Eggs
  4. Grilled Cheese
  5. French Toast
  6. Spaghetti
  7. Clam Chowder
  8. Macaroni & Cheese
  9. Waffles
  10. Chocolate Fondue
  11. Burritos
  12. Boiled Lobster
  13. Stew
  14. Seafood Pasta

Continue reading

Posted in Tech Tips | Tagged , , | 8 Comments

“Restaurant Story is an online game and requires internet access, but I wasn’t able to connect”

“Restaurant Story is an online game and requires internet access, but I wasn’t able to connect. Please double check your connection and I’ll try again”

Restaurant Story is one of the top-featured games on iTunes, and it has been recieving a lot of new users recently. Because of this, especially in the evenings, their servers have began to become overloaded – especially for high ranking users.

If you are receiving this error, it is possible that it is because of your internet connection. If you are receiving this error over and over again, it is most likely because the Restaurant Story server is overloaded.

Fixes and Solutions

  • If you are using this game on a device with 3G, make sure you have Cell Phone reception, especially the data type, like 3G, 4G, or CDMA.
  • If you are using this game witha  WiFi connection, make sure that you are actually connected and have adequate signal strength.
  • If both of those things are true, then the Restaurant Story server is probably overloaded. Try at a different time of day to confirm.

Update: The other fix for this may be that you need to restart your device.

Posted in Tech Tips | Tagged , , | Leave a comment

Shopify: Disable HTTPS pages from being indexed by Google

Add this somewhere in the  <head></head> area of your theme.liquid file:

{% capture protocol %}{{ "reset.css" | asset_url | truncate: 5,'' }}{% endcapture %}
{% if protocol == "https" %}<meta name="robots" content="noindex, follow" />{% endif %}

Shopify: Disable HTTPS pages from being indexed by Google

Posted in Web Development | Tagged , , , | Leave a comment

14GB iPad

A 16GB iPad has approximately 14GB of space.

So on an iPad, specs are based on actual count and usage uses the number 1024 for all conversions in computers. Thus 16,000,000,000 bytes, = 16,000,000,000/1024 to get 14GB.

There are multiple legal ways of defining bytes, kilobytes, megabytes, gigabytes, terabytes, etc.

A standard kilobyte (KB) is defined as 1024 bytes. But drive manufacturers use the more ‘lean’ definition of kilobyte, which is a very strict 1000 bytes, as opposed to 1024 bytes.

http://compreviews.about.com/od/storage/a/ActualHDSizes.htm

At some point in time, most users have come across a situation where a drive or disk being used run out of space even though there is thought to be plenty of space. A lot of times, this is the rude awakening for the consumer that the device they are attempting to store data on is not as large as it was advertised. In this article, we take a look at how manufacturers rate the capacity of storage devices such as hard drives, floppies, flash media and compact disks and their actual size.

Bits, Bytes and Prefixes.

All computer data is stored in a binary format as either a one or zero. Eight of these bits together for the most commonly referred to item in computing, the byte. The various amounts of storage capacity are referred by a prefix to represent a specific amount, similar to the metric prefixes. Since all computers are based on binary math, these prefixes represent base 2 amounts. Each level is an increment of 2 to the 10th power or 1,024. The common prefixes are as follows:

Kilobyte (KB) = 1,024 Bytes
MegaByte (MB) = 1,024 Kilobytes or 1,048,576 Bytes
Gigabyte (GB) = 1,024 Megabytes or 1,073,741,824 Bytes
Terabyte (TB) = 1,024 Gigabytes or 1,099,511,627,776 Bytes
This is very important information because when a computer operating system or program reports the available space on a drive, it is going to report the overall total of available bytes or reference them by one of the prefixes. So, an OS reporting a total space of 70.4 GB actually has around 75,591,424,409 Bytes of storage space.

Advertised vs. Actual

Since consumers don’t think in base 2 mathematics, manufacturers decided to rate most drive capacities based on the standard base 10 numbers we are all familiar with. Therefore, one Megabyte equals one million bytes while one Gigabyte equals one billion bytes. This isn’t too much of a problem with fairly small numbers such as a Kilobyte, but each level of increase in the prefix also increased the total discrepancy of the actual space compared to the advertised space.

Here is a quick reference to show the amount that the actual values differ compared to the advertised for each common referenced value:

Megabyte Difference = 48,576 Bytes
Gigabyte Difference = 73,741,824 Bytes
Terabyte Difference = 99,511,627,776 Bytes

Posted in Mac, Tech Tips | Tagged | Leave a comment

firebug: recursion detected

A PHP Error was encountered
Severity: Warning
Message: json_encode() [function.json-encode]: recursion detected
Filename: firephpcore/FirePHP.class.php
Line Number: 1198

This warning is mostly likely because too much data is being logged. If you are using a framework, especially something like CodeIgniter, this may be the reason. FirePHP detects and breaks recursion but json_encode still has a problem with all of this data.

You can use the object filter feature of the FirePHPCore library to get around this problem:

$firephp->setObjectFilter(‘ClassName’,
array(‘MemberName’));

See: http://www.firephp.org/HQ/Use.htm

Using this method you can exclude specific object members from being logged. Look at the classes in your framework and try to determine which object members contain references to other objects that are not really of any interest to you when debugging. Excluding members not required during debugging will dramatically reduce the amount of data logged.

There is a ticket concerning the ability to exclude wrapping code from appearing in traces. Feel free to add your comments: http://code.google.com/p/firephp/issues/detail?id=62

At this time you cannot limit the number of steps in a backtrace. Please file a ticket to add this feature.

Via http://tinyurl.com/6grhocx

Posted in Web Development | Leave a comment

Inspiron n5010 – Replace Hard Drive

Hard Drive: Dell Inspiron N5010/M5010 Service Manual

Hard Drive

Dell

Posted in Tech Tips | Leave a comment

MMFix.dmg.zip

In Snow Leopard the Play / Pause media button (on the F8 key) opens up iTunes. How can I disable that? Preferably keeping the old Leopard behaviour, so I can use it to control other media applications (e.g. Spotify).

Some French mac user did a great job to make a patch for this bug. It patches rcd, which is updated every mac version (so keep the patch up to date with this topic [1]).

You can download the file here: MMFix.dmg.zip

Posted in Software | Tagged , , , | 1 Comment