Eco (Embedded Coffee Script) Error – Unexpected dedent

Ran into this error when testing out eco (Embedded Coffee Script) templates.

Parse error on line #: unexpected dedent
(in c:/project/app/assets/javascripts/backbone/templates/dartboard.jst.eco)

Broken code:

<% if 7 > 3 %>
  teststring
<% end %>

Fixed Code:

<% if 7 > 3: %>
  teststring
<% end %>

Notice the colon, this is telling coffeescript that the next line is indented. It’s document here: https://github.com/sstephenson/eco it had just slipped my mind.

Ry

Birth Control Reminder Text (SMS) Free – Alertzy.com – Canada & USA

Hey Everyone,

I just finished adding a birth control reminder to www.Alertzy.com! It was an interesting addition since I don’t have any “business knowledge” on how the whole birth control system works.

Here’s how it’s broken down:
There’s 2 types of birth control, 21 day and 28 day. The 28 day puts a “spacer” for 7 days (a sugar pill) after the first 21 days. I really wanted to be able to allow both (rather then sending a message every single day). So I set it up that the 21 day reminder to put a 7 day gap (with no text(SMS)) at the end.

Why did I choose birth control for Alertzy? Alertzy’s “motto” is reminders for data that CHANGES. Anything that could be easily punched into a calendar, you won’t see on Alertzy. There’s 2 levels of complexity when taking birth control, reminders, and which cycle day you’re on.

The 28 day reminder part is simple (and could be easily punch into a calendar), however Alertzy also includes the pill #. This seems to be a large difference when compared to other competitors. With Alertzy you don’t need to turn a dial on a birth control system, and you always know which pill you’re on for that day.

The 21 day reminder has a large advantage over the competitors also. Not only would it be a huge pain to punch into a phone, it also gives you 7 day grace period at the end of your 21 days. After the 7 days you’ll start back at cycle #1 and not have to worry about tracking which day to take it.

Hopefully that explains why we chose to have a birth control reminder. Remember that Alertzy’s birth control reminder is a free service, phone independent, and available in Canada and the United States!

Thanks,
Ryan

iPhone Upgrade 3200 Error when upgrading to iOS5

If you get this error just make sure to keep trying to update. It WILL eventually go through. It took me 4 times of trying to update for it to go through.

Using Sharepoint 2010 SOAP/Web Client – C#

I’ve been meaning to post this for a while since I had some annoying issues with CAML and Sharepoint 2010. Here’s the structure I’m using:

I’ve had to do quite a few things with the Sharepoint 2010 web services and web client object. I figured I should post some solutions as quite a few of these are undocumented. My goal was not to have to import the SP Library and just use the web services along with the basic GET PUT methods of the WebClient.

Create a Folder with SharePoint 2010 via SOAP Web Services – UpdateListItems
http://www.ryanonrails.com/2011/10/11/create-a-folder-with-sharepoint-2010-via-soap-web-services-updatelistitems/

Upload a document to Sharepoint 2010 via WebClient
http://www.ryanonrails.com/2011/09/17/upload-a-document-to-sharepoint-2010-via-webclient/

Retrieve document ID from SharePoint 2010 via SOAP Web Services – GetListItems
http://www.ryanonrails.com/2011/08/30/retrieve-document-id-from-sharepoint-2010-via-soap-web-services-getlistitems/

Update Custom Columns from SharePoint 2010 via SOAP Web Services – UpdateListItems
http://www.ryanonrails.com/2011/08/30/update-custom-columns-from-sharepoint-2010-via-soap-web-services-updatelistitems/

Check in a file into SharePoint 2010 via SOAP Web Services – CheckInFile
http://www.ryanonrails.com/2011/08/30/check-in-a-file-into-sharepoint-2010-via-soap-web-services-%E2%80%93-checkinfile/

Delete document from SharePoint 2010 via SOAP Web Services – UpdateListItems
http://www.ryanonrails.com/2011/08/30/delete-document-from-sharepoint-2010-via-soap-web-services-updatelistitems/

Download a document from Sharepoint 2010 via WebClient
http://www.ryanonrails.com/2011/10/11/download-a-document-from-sharepoint-2010-via-webclient/

Download a document from Sharepoint 2010 via WebClient

Here’s how I use the WebClient object to download a pdf from Sharepoint 2010:

string uri = "wwww.google.ca";
string filepath = "waffles.pdf";
 
WebClient wc = new WebClient();
wc.Credentials = loginCredentials;
byte[] generatedPdf = wc.DownloadData(uri + "/" + filePath);
Return top